Commit af8b2d04 authored by Huiwei Lu's avatar Huiwei Lu Committed by Wesley Bland
Browse files

Adds checking VC state in MPID_Recv



Similar to d086ac27, check the state of a VC to see if it is valid
before creating a group, request or communicator in MPID_Recv.
Signed-off-by: default avatarWesley Bland <wbland@anl.gov>
parent a91f178a
......@@ -75,6 +75,7 @@ int MPID_Recv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
if (MPIDI_Request_get_sync_send_flag(rreq))
{
MPIDI_Comm_get_vc_set_active(comm, rreq->dev.match.parts.rank, &vc);
MPIU_ERR_CHKANDJUMP1(vc->state == MPIDI_VC_STATE_MORIBUND, mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", rreq->dev.match.parts.rank);
mpi_errno = MPIDI_CH3_EagerSyncAck( vc, rreq );
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
}
......@@ -126,6 +127,7 @@ int MPID_Recv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
else if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_RNDV_MSG)
{
MPIDI_Comm_get_vc_set_active(comm, rreq->dev.match.parts.rank, &vc);
MPIU_ERR_CHKANDJUMP1(vc->state == MPIDI_VC_STATE_MORIBUND, mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", rreq->dev.match.parts.rank);
mpi_errno = vc->rndvRecv_fn( vc, rreq );
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment