[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.3-53-g36d11a1

Service Account noreply at mpich.org
Wed Oct 29 11:27:01 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  36d11a1383cfecd65bfbf429692aa1afd5395a12 (commit)
       via  993845eaa36b9c5ca55c5b1eb11502fc71b9234e (commit)
      from  e2db1e48598bad1814876b2a222649ad1dec8bc6 (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/36d11a1383cfecd65bfbf429692aa1afd5395a12

commit 36d11a1383cfecd65bfbf429692aa1afd5395a12
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Tue Oct 28 14:00:43 2014 -0500

    portals4: set reasonable interface limits
    
    Set reasonable limits for maximum unexpected headers and EQs at init
    time. We accomplish this with a pre-init stage where we fill in a limits
    struct with the system defaults, increase certain values (if they are not
    set already in the environment), then do the real init.
    
    If the "desired" limits structure had a way to allow default values for
    limits we don't care about, the pre-init stage could go away.
    
    Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>

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 9535797..a6ef6e6 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
@@ -11,7 +11,8 @@
 #error Checkpointing not implemented
 #endif
 
-#define EQ_COUNT 1024
+#define UNEXPECTED_HDR_COUNT 32768
+#define EQ_COUNT             32768
 #define NID_KEY  "NID"
 #define PID_KEY  "PID"
 #define PTI_KEY  "PTI"
@@ -81,6 +82,7 @@ static int ptl_init(MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max
     int mpi_errno = MPI_SUCCESS;
     int ret;
     ptl_md_t md;
+    ptl_ni_limits_t desired;
     MPIDI_STATE_DECL(MPID_STATE_PTL_INIT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_PTL_INIT);
@@ -101,19 +103,28 @@ static int ptl_init(MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max
 
     MPIDI_Anysource_improbe_fn = MPID_nem_ptl_anysource_improbe;
 
-    /* set the unexpected header limit before PtlInit, unless it is already set in the env */
-    if (getenv("PTL_LIM_MAX_UNEXPECTED_HEADERS") == NULL) {
-        char *envstr = MPIU_Strdup("PTL_LIM_MAX_UNEXPECTED_HEADERS=2000000");
-        MPL_putenv(envstr);
-        MPIU_Free(envstr);
-    }
-
     /* init portals */
     ret = PtlInit();
     MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlinit", "**ptlinit %s", MPID_nem_ptl_strerror(ret));
     
+    /* do an interface pre-init to get the default limits struct */
+    ret = PtlNIInit(PTL_IFACE_DEFAULT, PTL_NI_MATCHING | PTL_NI_PHYSICAL,
+                    PTL_PID_ANY, NULL, &desired, &MPIDI_nem_ptl_ni);
+    MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlniinit", "**ptlniinit %s", MPID_nem_ptl_strerror(ret));
+
+    /* finalize the interface so we can re-init with our desired maximums */
+    ret = PtlNIFini(MPIDI_nem_ptl_ni);
+    MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlnifini", "**ptlnifini %s", MPID_nem_ptl_strerror(ret));
+
+    /* set higher limits if they are determined to be too low */
+    if (desired.max_unexpected_headers < UNEXPECTED_HDR_COUNT && getenv("PTL_LIM_MAX_UNEXPECTED_HEADERS") == NULL)
+        desired.max_unexpected_headers = UNEXPECTED_HDR_COUNT;
+    if (desired.max_eqs < EQ_COUNT && getenv("PTL_LIM_MAX_EQS") == NULL)
+        desired.max_eqs = EQ_COUNT;
+
+    /* do the real init */
     ret = PtlNIInit(PTL_IFACE_DEFAULT, PTL_NI_MATCHING | PTL_NI_PHYSICAL,
-                    PTL_PID_ANY, NULL, &MPIDI_nem_ptl_ni_limits, &MPIDI_nem_ptl_ni);
+                    PTL_PID_ANY, &desired, &MPIDI_nem_ptl_ni_limits, &MPIDI_nem_ptl_ni);
     MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlniinit", "**ptlniinit %s", MPID_nem_ptl_strerror(ret));
 
     ret = PtlEQAlloc(MPIDI_nem_ptl_ni, EQ_COUNT, &MPIDI_nem_ptl_eq);

http://git.mpich.org/mpich.git/commitdiff/993845eaa36b9c5ca55c5b1eb11502fc71b9234e

commit 993845eaa36b9c5ca55c5b1eb11502fc71b9234e
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Tue Oct 28 13:37:58 2014 -0500

    portals4: reduce unexpected buffer space
    
    Out previous increase consumed too much memory. 8MB should be enough given
    the maximum put size and number of headers.
    
    Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
index 3394ff4..8104eaf 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
@@ -7,7 +7,7 @@
 #include "ptl_impl.h"
 
 #define OVERFLOW_LENGTH (1024*1024)
-#define NUM_OVERFLOW_ME 512
+#define NUM_OVERFLOW_ME 8
 
 static ptl_handle_me_t overflow_me_handle[NUM_OVERFLOW_ME];
 static void *overflow_buf[NUM_OVERFLOW_ME];

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

Summary of changes:
 .../channels/nemesis/netmod/portals4/ptl_init.c    |   29 +++++++++++++------
 .../channels/nemesis/netmod/portals4/ptl_poll.c    |    2 +-
 2 files changed, 21 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list