[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.3-58-g920661c
Service Account
noreply at mpich.org
Thu Oct 30 10:26:24 CDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 920661c393108e23b596a29af9e791cc13b82b34 (commit)
from 669f4286cf5b9de036b85645fa6996124fbee485 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/920661c393108e23b596a29af9e791cc13b82b34
commit 920661c393108e23b596a29af9e791cc13b82b34
Author: Min Si <msi at il.is.s.u-tokyo.ac.jp>
Date: Fri Oct 17 11:05:10 2014 -0500
Bug-fix: trigger final req handler for receiving derived datatype.
There are two request handlers used when receiving data:
(1) OnDataAvail, which is triggered when data is arrived;
(2) OnFinal, which is triggered when receiving data is finished;
When receiving large derived datatype, the receiving iov can be divided
into multiple iovs. The OnDataAvail handler is set to iov load function
when still waiting for remaining data. However, such handler should be
set to OnFinal when starting receiving the last iov.
The original code does not set OnDataAvail handler to OnFinal at end.
This patch fixes this bug.
Note that this bug only appears in RMA calls, because only the RMA
packet handers need to specify OnFinal.
Resolve #2189.
Signed-off-by: Xin Zhao <xinzhao3 at illinois.edu>
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index af39b3d..c5ff48d 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -88,6 +88,8 @@ MPID_Request * MPID_Request_create(void)
req->dev.iov_offset = 0;
req->dev.flags = MPIDI_CH3_PKT_FLAG_NONE;
req->dev.resp_request_handle = MPI_REQUEST_NULL;
+ req->dev.OnDataAvail = NULL;
+ req->dev.OnFinal = NULL;
#ifdef MPIDI_CH3_REQUEST_INIT
MPIDI_CH3_REQUEST_INIT(req);
#endif
@@ -397,7 +399,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
MPIU_DBG_MSG(CH3_CHANNEL,VERBOSE,
"updating rreq to read the remaining data directly into the user buffer");
/* Eventually, use OnFinal for this instead */
- rreq->dev.OnDataAvail = 0;
+ rreq->dev.OnDataAvail = rreq->dev.OnFinal;
}
else if (last == rreq->dev.segment_size ||
(last - rreq->dev.segment_first) / rreq->dev.iov_count >= MPIDI_IOV_DENSITY_MIN)
@@ -466,7 +468,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
rreq->dev.iov[0].MPID_IOV_LEN = data_sz;
MPIU_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_RECV);
/* Eventually, use OnFinal for this instead */
- rreq->dev.OnDataAvail = 0;
+ rreq->dev.OnDataAvail = rreq->dev.OnFinal;
}
else
{
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 4cbf25c..1324324 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -4502,6 +4502,7 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
/* derived datatype */
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_PUT_RESP_DERIVED_DT);
req->dev.datatype = MPI_DATATYPE_NULL;
+ req->dev.OnFinal = MPIDI_CH3_ReqHandler_PutAccumRespComplete;
req->dev.dtype_info = (MPIDI_RMA_dtype_info *)
MPIU_Malloc(sizeof(MPIDI_RMA_dtype_info));
@@ -4806,6 +4807,7 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_ACCUM_RESP_DERIVED_DT);
req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumRespDerivedDTComplete;
req->dev.datatype = MPI_DATATYPE_NULL;
+ req->dev.OnFinal = MPIDI_CH3_ReqHandler_PutAccumRespComplete;
req->dev.dtype_info = (MPIDI_RMA_dtype_info *)
MPIU_Malloc(sizeof(MPIDI_RMA_dtype_info));
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/src/ch3u_request.c | 6 ++++--
src/mpid/ch3/src/ch3u_rma_sync.c | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list