Commit 1be5fc49 authored by Kenneth Raffenetti's avatar Kenneth Raffenetti
Browse files

mxm: fix anysource_matched



The return value of anysource_matched should be the actual result
of the cancel operation. If the result is uncancelable, i.e. already
matched, then CH3 will let the netmod message win and move on to the
other requests in the queue. When the completion for the unsuccessfully
canceled message comes in, we process it like normal.
Reviewed-by: default avatarIgor Ivanov <Igor.Ivanov@itseez.com>
Signed-off-by: default avatarAntonio J. Pena <apenya@mcs.anl.gov>
parent 51512b7d
...@@ -133,7 +133,7 @@ int MPID_nem_mxm_anysource_matched(MPID_Request * req) ...@@ -133,7 +133,7 @@ int MPID_nem_mxm_anysource_matched(MPID_Request * req)
req_area = REQ_BASE(req); req_area = REQ_BASE(req);
ret = mxm_req_cancel_recv(&req_area->mxm_req->item.recv); ret = mxm_req_cancel_recv(&req_area->mxm_req->item.recv);
mxm_req_wait(&req_area->mxm_req->item.base); mxm_req_wait(&req_area->mxm_req->item.base);
if ((MXM_OK != ret) && (MXM_ERR_NO_PROGRESS != ret)) { if (req_area->mxm_req->item.base.error != MXM_ERR_CANCELED) {
matched = TRUE; matched = TRUE;
} }
...@@ -225,7 +225,7 @@ int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq) ...@@ -225,7 +225,7 @@ int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq)
static int _mxm_handle_rreq(MPID_Request * req) static int _mxm_handle_rreq(MPID_Request * req)
{ {
int complete = FALSE; int complete = FALSE, found = FALSE;
int dt_contig; int dt_contig;
MPI_Aint dt_true_lb ATTRIBUTE((unused)); MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t userbuf_sz; MPIDI_msg_sz_t userbuf_sz;
...@@ -236,10 +236,12 @@ static int _mxm_handle_rreq(MPID_Request * req) ...@@ -236,10 +236,12 @@ static int _mxm_handle_rreq(MPID_Request * req)
void *tmp_buf = NULL; void *tmp_buf = NULL;
MPIU_THREAD_CS_ENTER(MSGQUEUE, req); MPIU_THREAD_CS_ENTER(MSGQUEUE, req);
complete = MPIDI_CH3U_Recvq_DP(req); found = MPIDI_CH3U_Recvq_DP(req);
MPIU_THREAD_CS_EXIT(MSGQUEUE, req); MPIU_THREAD_CS_EXIT(MSGQUEUE, req);
if (!complete) { /* an MPI_ANY_SOURCE request may have been previously removed from the
return TRUE; CH3 queue by an FDP (find and dequeue posted) operation */
if (req->dev.match.parts.rank != MPI_ANY_SOURCE) {
MPIU_Assert(found);
} }
MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype, dt_contig, userbuf_sz, dt_ptr, MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype, dt_contig, userbuf_sz, dt_ptr,
......
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