Commit e89e6c66 authored by Wesley Bland's avatar Wesley Bland
Browse files

Check for any source reqs that should be pending



Anysource requests involving a communicator that isn't collectively
active should be appended to the posted queue the error class should be
marked as MPIX_ERR_PROC_FAILED_PENDING. The operation can still be
completed later.
Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
parent d71154aa
......@@ -555,18 +555,18 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
} while (rreq);
}
else {
do { /* This loop is just to make it easy to break out if necessary */
if (tag == MPI_ANY_TAG)
match.parts.tag = mask.parts.tag = 0;
if (source == MPI_ANY_SOURCE) {
if (!MPIDI_CH3I_Comm_AS_enabled(comm)) {
MPIU_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail");
rreq->status.MPI_ERROR = mpi_errno;
MPIDI_CH3U_Request_complete(rreq);
goto lock_exit;
/* If MPI_ANY_SOURCE is disabled right now, we should
* just add this request to the posted queue instead and
* return the appropriate error. */
continue;
}
match.parts.rank = mask.parts.rank = 0;
}
do {
MPIR_T_PVAR_COUNTER_INC(RECVQ, unexpected_recvq_match_attempts, 1);
if (MATCH_WITH_LEFT_MASK(rreq->dev.match, match, mask)) {
......@@ -595,6 +595,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
prev_rreq = rreq;
rreq = rreq->dev.next;
} while (rreq);
} while (false);
}
}
MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq);
......@@ -639,10 +640,14 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
goto lock_exit;
}
} else if (!MPIDI_CH3I_Comm_AS_enabled(comm)) {
MPIU_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail");
/* If this receive is for MPI_ANY_SOURCE, we will still add the
* request to the queue for now, but we will also set the error
* class to MPIX_ERR_PROC_FAILED_PENDING since the request shouldn't
* be matched as long as there is a failure pending. This will get
* checked again later during the completion function to see if the
* request can be completed at that time. */
MPIU_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED_PENDING, "**failure_pending");
rreq->status.MPI_ERROR = mpi_errno;
MPIDI_CH3U_Request_complete(rreq);
goto lock_exit;
}
rreq->dev.next = NULL;
......
......@@ -49,6 +49,10 @@ int MPID_Irecv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomemreq");
}
if (MPIR_ERR_GET_CLASS(rreq->status.MPI_ERROR) == MPIX_ERR_PROC_FAILED_PENDING) {
mpi_errno = rreq->status.MPI_ERROR;
}
if (found)
{
MPIDI_VC_t * vc;
......
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