[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2a1-31-g6b8c426

Service Account noreply at mpich.org
Wed Oct 1 10:40:09 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  6b8c426d90b28bb0ed6ff6ade6ac03a4e4b96634 (commit)
      from  bb8f2b9a7ae4f624bb3fbf16a56d085326159582 (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/6b8c426d90b28bb0ed6ff6ade6ac03a4e4b96634

commit 6b8c426d90b28bb0ed6ff6ade6ac03a4e4b96634
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Mon Sep 29 21:13:09 2014 -0500

    portals4: cleanup usage of datatype info
    
    Fixes issues introduced in [fdd179c1] when doing noncontiguous sends
    or recvs over portals4. Also make more consistent usage of MPID_Segment
    manipulation functions.
    
    Signed-off-by: Antonio J. Pena <apenya 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 1e469f1..ea94581 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -106,7 +106,7 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
             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, dt_true_lb, &last, e->start);
+            MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, e->start);
             MPIU_ERR_CHKANDJUMP(last != e->mlength, mpi_errno, MPI_ERR_OTHER, "**dtypemismatch");
         }
     }
@@ -213,7 +213,6 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
         if (dt_contig) {
             MPIU_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength);
         } else {
-            rreq->dev.segment_first = dt_true_lb;
             last = e->mlength;
             MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, e->start);
             MPIU_Assert(last == e->mlength);
@@ -412,8 +411,8 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
             MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Small noncontig message");
             rreq->dev.segment_ptr = MPID_Segment_alloc();
             MPIU_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-            MPID_Segment_init((char *)rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
-            rreq->dev.segment_first = dt_true_lb;
+            MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
+            rreq->dev.segment_first = 0;
             rreq->dev.segment_size = data_sz;
 
             last = rreq->dev.segment_size;
@@ -451,7 +450,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
             rreq->dev.segment_ptr = MPID_Segment_alloc();
             MPIU_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
             MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
-            rreq->dev.segment_first = dt_true_lb;
+            rreq->dev.segment_first = 0;
             rreq->dev.segment_size = data_sz;
 
             last = PTL_LARGE_THRESHOLD;
@@ -663,7 +662,7 @@ int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPID_IOV s_
                              "**nomem %s", "MPID_Segment_alloc");
         MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype,
                           rreq->dev.segment_ptr, 0);
-        rreq->dev.segment_first = dt_true_lb;
+        rreq->dev.segment_first = 0;
         rreq->dev.segment_size = data_sz - PTL_LARGE_THRESHOLD;
         last = PTL_LARGE_THRESHOLD;
         MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.tmpbuf);
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 2bb592c..12b942c 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -226,7 +226,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
         sreq->dev.segment_ptr = MPID_Segment_alloc();
         MPIU_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
         MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
-        sreq->dev.segment_first = dt_true_lb;
+        sreq->dev.segment_first = 0;
         sreq->dev.segment_size = data_sz;
 
         last = sreq->dev.segment_size;
@@ -256,7 +256,8 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
         /* IOV is not long enough to describe entire message */
         MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "    IOV too long: using bounce buffer");
         MPIU_CHKPMEM_MALLOC(REQ_PTL(sreq)->chunk_buffer[0], void *, data_sz, mpi_errno, "chunk_buffer");
-        sreq->dev.segment_first = dt_true_lb;
+        MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+        sreq->dev.segment_first = 0;
         last = data_sz;
         MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, REQ_PTL(sreq)->chunk_buffer[0]);
         MPIU_Assert(last == sreq->dev.segment_size);
@@ -273,7 +274,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     if (dt_contig) {
         /* create ME for buffer so receiver can issue a GET for the data */
         MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Large contig message");
-        me.start = (char *)buf + PTL_LARGE_THRESHOLD;
+        me.start = (char *)buf + dt_true_lb + PTL_LARGE_THRESHOLD;
         me.length = data_sz - PTL_LARGE_THRESHOLD;
         me.ct_handle = PTL_CT_NONE;
         me.uid = PTL_UID_ANY;
@@ -291,7 +292,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
         REQ_PTL(sreq)->large = TRUE;
             
         REQ_PTL(sreq)->event_handler = handler_large;
-        ret = PtlPut(MPIDI_nem_ptl_global_md, (ptl_size_t)buf, PTL_LARGE_THRESHOLD, PTL_ACK_REQ, vc_ptl->id, vc_ptl->pt,
+        ret = PtlPut(MPIDI_nem_ptl_global_md, (ptl_size_t)((char *)buf + dt_true_lb), PTL_LARGE_THRESHOLD, 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 | NPTL_LARGE, data_sz));
         MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret));
@@ -304,7 +305,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     sreq->dev.segment_ptr = MPID_Segment_alloc();
     MPIU_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
     MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
-    sreq->dev.segment_first = dt_true_lb;
+    sreq->dev.segment_first = 0;
     sreq->dev.segment_size = data_sz;
 
     last = PTL_LARGE_THRESHOLD;

-----------------------------------------------------------------------

Summary of changes:
 .../channels/nemesis/netmod/portals4/ptl_recv.c    |   11 +++++------
 .../channels/nemesis/netmod/portals4/ptl_send.c    |   11 ++++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list