[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-257-g896fd85

Service Account noreply at mpich.org
Fri Jul 17 13:15:12 CDT 2015


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  896fd85a5b13f69e1c233ec9dd4e4b70e7db2493 (commit)
      from  13160734588f866d802124c9ea33eaad29b9dd51 (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/896fd85a5b13f69e1c233ec9dd4e4b70e7db2493

commit 896fd85a5b13f69e1c233ec9dd4e4b70e7db2493
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Thu Jul 16 10:58:42 2015 -0500

    portals4: use dummy buffer for NULL send/recv
    
    The Portals 4 reference implementation contains a costly memory
    registration workaround when doing a NULL/0-byte send/recv. This
    patch uses a dummy address in place of NULL to give Portals a
    a chance to cache the registration.
    
    Signed-off-by: Lena Oden <loden at anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index b0203dc..7ec7870 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -29,6 +29,9 @@ extern ptl_handle_eq_t MPIDI_nem_ptl_rpt_eq;
 extern ptl_handle_md_t MPIDI_nem_ptl_global_md;
 extern ptl_ni_limits_t MPIDI_nem_ptl_ni_limits;
 
+/* workaround for NULL operations */
+extern char dummy;
+
 #define MPID_NEM_PTL_MAX_OVERFLOW_DATA 32 /* that's way more than we need */
 typedef struct MPID_nem_ptl_pack_overflow
 {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
index f4fa90b..2a41823 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
@@ -43,6 +43,8 @@ ptl_pt_index_t  MPIDI_nem_ptl_get_rpt_pt; /* portal for rportals control message
 ptl_handle_md_t MPIDI_nem_ptl_global_md;
 ptl_ni_limits_t MPIDI_nem_ptl_ni_limits;
 
+char dummy;
+
 static int ptl_init(MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p);
 static int ptl_finalize(void);
 static int get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p);
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 ae1406c..588fc0a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -474,8 +474,12 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
     if (data_sz <= PTL_LARGE_THRESHOLD) {
         if (dt_contig) {
             /* small contig message */
+            void *start = (char *)rreq->dev.user_buf + dt_true_lb;
             MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Small contig message");
-            me.start = (char *)rreq->dev.user_buf + dt_true_lb;
+            if (start == NULL)
+                me.start = &dummy;
+            else
+                me.start = start;
             me.length = data_sz;
             REQ_PTL(rreq)->event_handler = handler_recv_dequeue_complete;
         } 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 56746b1..1ef148f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -140,12 +140,18 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     if (data_sz <= PTL_LARGE_THRESHOLD) {
         /* Small message.  Send all data eagerly */
         if (dt_contig) {
+            void *start = (char *)buf + dt_true_lb;
             MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Small contig message");
             REQ_PTL(sreq)->event_handler = handler_send;
             MPIU_DBG_MSG_P(CH3_CHANNEL, VERBOSE, "&REQ_PTL(sreq)->event_handler = %p", &(REQ_PTL(sreq)->event_handler));
-            ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)((char *)buf + dt_true_lb), data_sz, PTL_NO_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));
+            if (start == NULL)
+                ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)&dummy, data_sz, PTL_NO_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));
+            else
+                ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)start, data_sz, PTL_NO_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));
             DBG_MSG_PUT("global", data_sz, vc->pg_rank, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), NPTL_HEADER(ssend_flag, data_sz));
             MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "id.nid = %#x", vc_ptl->id.phys.nid);

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

Summary of changes:
 .../channels/nemesis/netmod/portals4/ptl_impl.h    |    3 +++
 .../channels/nemesis/netmod/portals4/ptl_init.c    |    2 ++
 .../channels/nemesis/netmod/portals4/ptl_recv.c    |    6 +++++-
 .../channels/nemesis/netmod/portals4/ptl_send.c    |   12 +++++++++---
 4 files changed, 19 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list