[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.2-13-g494f597
Service Account
noreply at mpich.org
Tue Jul 29 10:41:38 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 494f597b956c4a1557c986848e3b5eabb80faa32 (commit)
from a3fc775402614eda55b34b6d5db51d1555e36653 (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/494f597b956c4a1557c986848e3b5eabb80faa32
commit 494f597b956c4a1557c986848e3b5eabb80faa32
Author: Antonio Pena Monferrer <apenya at mcs.anl.gov>
Date: Mon Jul 28 12:45:37 2014 -0500
Fixed datatype displacement use in portals4 netmod
The current implementation was not taking into account the datatype offset.
These changes mainly add the "dt_true_lb" field from the MPIDI_Datatype_get_info
function to the user-specified buffer pointer.
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
index 6760165..712e006 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -91,12 +91,15 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
/* unpack the data from unexpected buffer */
int is_contig;
MPI_Aint last;
+ MPI_Aint dt_true_lb;
+ MPIDI_msg_sz_t data_sz ATTRIBUTE((unused));
+ MPID_Datatype *dt_ptr ATTRIBUTE((unused));
- MPID_Datatype_is_contig(rreq->dev.datatype, &is_contig);
+ MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype, is_contig, data_sz, dt_ptr, dt_true_lb);
MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "is_contig = %d", is_contig);
if (is_contig) {
- MPIU_Memcpy(rreq->dev.user_buf, e->start, e->mlength);
+ MPIU_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength);
} else {
last = e->mlength;
MPID_Segment_unpack(rreq->dev.segment_ptr, 0, &last, e->start);
@@ -204,7 +207,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
/* unpack data from unexpected buffer first */
if (e->type == PTL_EVENT_PUT_OVERFLOW) {
if (dt_contig) {
- MPIU_Memcpy(rreq->dev.user_buf, e->start, e->mlength);
+ MPIU_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength);
} else {
rreq->dev.segment_first = 0;
last = e->mlength;
@@ -227,10 +230,10 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
if (dt_contig) {
/* recv buffer is contig */
REQ_PTL(rreq)->event_handler = handler_recv_complete;
- ret = PtlGet(MPIDI_nem_ptl_global_md, (ptl_size_t)rreq->dev.user_buf + PTL_LARGE_THRESHOLD, data_sz - PTL_LARGE_THRESHOLD,
- vc_ptl->id, vc_ptl->ptg, e->match_bits, 0, rreq);
+ ret = PtlGet(MPIDI_nem_ptl_global_md, (ptl_size_t)((char *)rreq->dev.user_buf + dt_true_lb + PTL_LARGE_THRESHOLD),
+ data_sz - PTL_LARGE_THRESHOLD, vc_ptl->id, vc_ptl->ptg, e->match_bits, 0, rreq);
DBG_MSG_GET("global", data_sz - PTL_LARGE_THRESHOLD, vc->pg_rank, e->match_bits);
- MPIU_DBG_MSG_P(CH3_CHANNEL, VERBOSE, " buf=%p", (char *)rreq->dev.user_buf + PTL_LARGE_THRESHOLD);
+ MPIU_DBG_MSG_P(CH3_CHANNEL, VERBOSE, " buf=%p", (char *)rreq->dev.user_buf + dt_true_lb + PTL_LARGE_THRESHOLD);
MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlget", "**ptlget %s", MPID_nem_ptl_strerror(ret));
goto fn_exit;
}
@@ -393,7 +396,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
if (dt_contig) {
/* small contig message */
MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Small contig message");
- me.start = rreq->dev.user_buf;
+ me.start = (char *)rreq->dev.user_buf + dt_true_lb;
me.length = data_sz;
REQ_PTL(rreq)->event_handler = handler_recv_dequeue_complete;
} else {
@@ -431,7 +434,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
if (dt_contig) {
/* large contig message */
MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Large contig message");
- me.start = rreq->dev.user_buf;
+ me.start = (char *)rreq->dev.user_buf + dt_true_lb;
me.length = PTL_LARGE_THRESHOLD;
REQ_PTL(rreq)->event_handler = handler_recv_dequeue_large;
} else {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
index ae2120a..a642fbd 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -207,7 +207,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Small contig message");
REQ_PTL(sreq)->event_handler = handler_send_complete;
MPIU_DBG_MSG_P(CH3_CHANNEL, VERBOSE, "&REQ_PTL(sreq)->event_handler = %p", &(REQ_PTL(sreq)->event_handler));
- ret = PtlPut(MPIDI_nem_ptl_global_md, (ptl_size_t)buf, data_sz, PTL_ACK_REQ, vc_ptl->id, vc_ptl->pt,
+ ret = PtlPut(MPIDI_nem_ptl_global_md, (ptl_size_t)((char *)buf + dt_true_lb), data_sz, PTL_ACK_REQ, vc_ptl->id, vc_ptl->pt,
NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), 0, sreq,
NPTL_HEADER(ssend_flag, data_sz));
MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret));
-----------------------------------------------------------------------
Summary of changes:
.../channels/nemesis/netmod/portals4/ptl_recv.c | 19 +++++++++++--------
.../channels/nemesis/netmod/portals4/ptl_send.c | 2 +-
2 files changed, 12 insertions(+), 9 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list