[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-216-gcf31e37

mysql vizuser noreply at mpich.org
Fri May 17 16:18:51 CDT 2013


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  cf31e37add0a36154ca5849c9390be38f870f750 (commit)
       via  cbcde2f48326572c65b6bfd7688968205615eb85 (commit)
       via  e279b1ae6ea2d369c24efcdab03d21ddc3ac3281 (commit)
       via  60a89bbdbad3d303b54c78b96d285e22b68c0f65 (commit)
       via  4456bbeccb7229bfc7ed1bbcb09168afba6349a6 (commit)
       via  430514fda404e88a48decbf76e67b06ea21778d0 (commit)
       via  c6084635dec65194544475604890cf50896fdcf2 (commit)
       via  fa950cb50d36b94397604db30546b41dc60f0e77 (commit)
      from  50d4516ddfe85f041ca52a0953c1d930ce1051cf (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/cf31e37add0a36154ca5849c9390be38f870f750

commit cf31e37add0a36154ca5849c9390be38f870f750
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed May 15 18:52:22 2013 -0500

    Allow pamid to override max message size for SMP collectives.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/src/mpid/pamid/include/mpidpre.h b/src/mpid/pamid/include/mpidpre.h
index 68ab472..ebb99af 100644
--- a/src/mpid/pamid/include/mpidpre.h
+++ b/src/mpid/pamid/include/mpidpre.h
@@ -70,4 +70,8 @@
 #define MPID_HANDLE_NUM_INDICES 256
 #endif /* __BGQ__ */
 
+#define MPID_MAX_SMP_BCAST_MSG_SIZE (16384)
+#define MPID_MAX_SMP_REDUCE_MSG_SIZE (16384)
+#define MPID_MAX_SMP_ALLREDUCE_MSG_SIZE (16384)
+
 #endif

http://git.mpich.org/mpich.git/commitdiff/cbcde2f48326572c65b6bfd7688968205615eb85

commit cbcde2f48326572c65b6bfd7688968205615eb85
Author: Charles Archer <archerc at us.ibm.com>
Date:   Mon Mar 11 12:47:33 2013 -0400

    Enable SMP aware collectives via PAMI local task detection
    
    (ibm) D188808
    (ibm) 2021904184004ba65cb4f277d01dc88b47d692bc
    
    Signed-off-by: Bob Cernohous <bobc at us.ibm.com>
    
    Modified significantly by Pavan Balaji to utilize mpich infrastructure
    more consistently for all SMP collectives.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 11191da..9a818f5 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -139,6 +139,7 @@ int MPIR_Allreduce_intra (
     int        comm_size, rank, type_size;
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
+    int nbytes = 0;
     int mask, dst, is_commutative, pof2, newrank, rem, newdst, i,
         send_idx, recv_idx, last_idx, send_cnt, recv_cnt, *cnts, *disps; 
     MPI_Aint true_extent, true_lb, extent;
@@ -156,7 +157,10 @@ int MPIR_Allreduce_intra (
 
     if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_PARAM_ENABLE_SMP_ALLREDUCE) {
     /* is the op commutative? We do SMP optimizations only if it is. */
-    if (MPIR_Comm_is_node_aware(comm_ptr) && is_commutative) {
+    MPID_Datatype_get_size_macro(datatype, type_size);
+    nbytes = MPIR_PARAM_MAX_SMP_ALLREDUCE_MSG_SIZE ? type_size*count : 0;
+    if (MPIR_Comm_is_node_aware(comm_ptr) && is_commutative &&
+        nbytes <= MPIR_PARAM_MAX_SMP_ALLREDUCE_MSG_SIZE) {
         /* on each node, do a reduce to the local root */ 
         if (comm_ptr->node_comm != NULL) {
             /* take care of the MPI_IN_PLACE case. For reduce, 
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index c25b714..da83463 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -1150,8 +1150,10 @@ int MPIR_Bcast_intra (
 
     if (count == 0) goto fn_exit;
 
+    MPID_Datatype_get_size_macro(datatype, type_size);
+    nbytes = MPIR_PARAM_MAX_SMP_BCAST_MSG_SIZE ? type_size*count : 0;
     if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_PARAM_ENABLE_SMP_BCAST &&
-        MPIR_Comm_is_node_aware(comm_ptr)) {
+        nbytes <= MPIR_PARAM_MAX_SMP_BCAST_MSG_SIZE && MPIR_Comm_is_node_aware(comm_ptr)) {
         mpi_errno = MPIR_SMP_Bcast(buffer, count, datatype, root, comm_ptr, errflag);
         if (mpi_errno) {
             /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index f343b8e..99bb5b9 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -684,6 +684,7 @@ int MPIR_Reduce_intra (
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
     int comm_size, is_commutative, type_size, pof2;
+    int nbytes = 0;
     MPID_Op *op_ptr;
     MPIU_CHKLMEM_DECL(1);
 
@@ -700,7 +701,10 @@ int MPIR_Reduce_intra (
         is_commutative = (op_ptr->kind == MPID_OP_USER_NONCOMMUTE) ? 0 : 1;
     }
 
-    if (MPIR_Comm_is_node_aware(comm_ptr) && is_commutative) {
+    MPID_Datatype_get_size_macro(datatype, type_size);
+    nbytes = MPIR_PARAM_MAX_SMP_REDUCE_MSG_SIZE ? type_size*count : 0;
+    if (MPIR_Comm_is_node_aware(comm_ptr) && is_commutative &&
+        nbytes <= MPIR_PARAM_MAX_SMP_REDUCE_MSG_SIZE) {
 
         void *tmp_buf = NULL;
         MPI_Aint  true_lb, true_extent, extent;
diff --git a/src/mpid/pamid/include/mpidi_datatypes.h b/src/mpid/pamid/include/mpidi_datatypes.h
index 2ec80d4..62adcbf 100644
--- a/src/mpid/pamid/include/mpidi_datatypes.h
+++ b/src/mpid/pamid/include/mpidi_datatypes.h
@@ -104,7 +104,7 @@ typedef struct
   unsigned statistics;     /**< The current level of stats collection.               */
   unsigned rma_pending;    /**< The max num outstanding requests during an RMA op    */
   unsigned shmem_pt2pt;    /**< Enable optimized shared memory point-to-point functions. */
-
+  unsigned smp_detect;
   pami_geometry_t world_geometry;
 
   struct
diff --git a/src/mpid/pamid/include/mpidi_platform.h b/src/mpid/pamid/include/mpidi_platform.h
index e706e03..9337c7d 100644
--- a/src/mpid/pamid/include/mpidi_platform.h
+++ b/src/mpid/pamid/include/mpidi_platform.h
@@ -79,6 +79,7 @@
 #define PAMIX_IS_LOCAL_TASK
 #define PAMIX_IS_LOCAL_TASK_STRIDE  (4)
 #define PAMIX_IS_LOCAL_TASK_SHIFT   (6)
+#define MPIDI_SMP_DETECT_DEFAULT 0
 #define TOKEN_FLOW_CONTROL    0
 
 /*
@@ -128,11 +129,15 @@ static const char _ibm_release_version_[] = "V1R2M0";
 #define TOKEN_FLOW_CONTROL    1
 #define DYNAMIC_TASKING       1
 
+/* Allow MPICH to detect local tasks */
+#define MPID_USE_NODE_IDS 1
+typedef int32_t MPID_Node_id_t;
+
 /* 'is local task' extension and limits */
 #define PAMIX_IS_LOCAL_TASK
 #define PAMIX_IS_LOCAL_TASK_STRIDE  (1)
 #define PAMIX_IS_LOCAL_TASK_SHIFT   (0)
-
+#define MPIDI_SMP_DETECT_DEFAULT 1
 /*
  * Enable only the 'local vs remote' point-to-point eager limits.
  */
diff --git a/src/mpid/pamid/include/pamix.h b/src/mpid/pamid/include/pamix.h
index 3f55400..6adbab5 100644
--- a/src/mpid/pamid/include/pamix.h
+++ b/src/mpid/pamid/include/pamix.h
@@ -26,11 +26,14 @@
 
 #include <pami.h>
 #include <mpidi_platform.h>
-
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
+typedef pami_result_t (*node_info_fn)(pami_task_t  task,
+                                      uint32_t    *node_id,
+                                      uint32_t    *offset,
+                                      uint32_t    *max_nodes);
 typedef struct
 {
   pami_extension_t progress;
@@ -42,6 +45,7 @@ typedef struct
     uint8_t          * base;
     uintptr_t          stride;
     uintptr_t          bitmask;
+    node_info_fn       node_info;
   } is_local_task;
 
 #if defined(__BGQ__)
diff --git a/src/mpid/pamid/src/mpid_init.c b/src/mpid/pamid/src/mpid_init.c
index e7bb3bc..45b6ff2 100644
--- a/src/mpid/pamid/src/mpid_init.c
+++ b/src/mpid/pamid/src/mpid_init.c
@@ -117,7 +117,7 @@ MPIDI_Process_t  MPIDI_Process = {
 
   .rma_pending           = 1000,
   .shmem_pt2pt           = 1,
-
+  .smp_detect            = MPIDI_SMP_DETECT_DEFAULT,
   .optimized = {
     .collectives         = MPIDI_OPTIMIZED_COLLECTIVE_DEFAULT,
     .subcomms            = 1,
diff --git a/src/mpid/pamid/src/mpidi_env.c b/src/mpid/pamid/src/mpidi_env.c
index e80c818..c14c617 100644
--- a/src/mpid/pamid/src/mpidi_env.c
+++ b/src/mpid/pamid/src/mpidi_env.c
@@ -1119,6 +1119,14 @@ MPIDI_Env_setup(int rank, int requested)
       ENV_Char(names, &MPIDI_Process.mp_s_use_pami_get);
     }
 #endif
+    /* MP_S_SMP_DETECT                                                         */
+    {
+      char* names[] = {"MP_S_SMP_DETECT", "PAMID_SMP_DIRECT", NULL};
+      ENV_Char(names, &MPIDI_Process.smp_detect);
+      if(!MPIDI_Process.smp_detect)
+        PAMIX_Extensions.is_local_task.node_info=NULL;
+    }
+
   }
     {
 #if TOKEN_FLOW_CONTROL
diff --git a/src/mpid/pamid/src/pamix/pamix.c b/src/mpid/pamid/src/pamix/pamix.c
index eae7934..e213d3a 100644
--- a/src/mpid/pamid/src/pamix/pamix.c
+++ b/src/mpid/pamid/src/pamix/pamix.c
@@ -101,18 +101,19 @@ PAMIX_Initialize(pami_client_t client)
 
 #ifdef PAMIX_IS_LOCAL_TASK
   {
-    PAMIX_Extensions.is_local_task.base    = NULL;
-    PAMIX_Extensions.is_local_task.stride  = 0;
-    PAMIX_Extensions.is_local_task.bitmask = 0;
-    PAMIX_Extensions.is_local_task.status  =
-      PAMI_Extension_open(client, "EXT_is_local_task",
-                          &PAMIX_Extensions.is_local_task.extension);
+    PAMIX_Extensions.is_local_task.base      = NULL;
+    PAMIX_Extensions.is_local_task.stride    = 0;
+    PAMIX_Extensions.is_local_task.bitmask   = 0;
+    PAMIX_Extensions.is_local_task.node_info = NULL;
+    PAMIX_Extensions.is_local_task.status    = PAMI_Extension_open(client, "EXT_is_local_task",
+                                                                   &PAMIX_Extensions.is_local_task.extension);
 
     if (PAMIX_Extensions.is_local_task.status == PAMI_SUCCESS)
       {
         PAMIX_Extensions.is_local_task.base    = PAMI_EXTENSION_FUNCTION(uint8_t *, "base",    PAMIX_Extensions.is_local_task.extension);
         PAMIX_Extensions.is_local_task.stride  = PAMI_EXTENSION_FUNCTION(uintptr_t, "stride",  PAMIX_Extensions.is_local_task.extension);
         PAMIX_Extensions.is_local_task.bitmask = PAMI_EXTENSION_FUNCTION(uintptr_t, "bitmask", PAMIX_Extensions.is_local_task.extension);
+        PAMIX_Extensions.is_local_task.node_info = PAMI_EXTENSION_FUNCTION(node_info_fn, "get_node_info", PAMIX_Extensions.is_local_task.extension);
       }
 
 #if defined(PAMIX_IS_LOCAL_TASK_STRIDE) && defined(PAMIX_IS_LOCAL_TASK_BITMASK)

http://git.mpich.org/mpich.git/commitdiff/e279b1ae6ea2d369c24efcdab03d21ddc3ac3281

commit e279b1ae6ea2d369c24efcdab03d21ddc3ac3281
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed May 15 18:08:49 2013 -0500

    Cap the maximum SMP collective size.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index 4f7d645..635f8a3 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -226,6 +226,15 @@ parameters:
         Enable SMP aware broadcast.
 
     - category    : collective
+      name        : MAX_SMP_BCAST_MSG_SIZE
+      type        : int
+      default     : 0
+      class       : device
+      description : >-
+        Maximum message size for which SMP-aware broadcast is used.  A
+        value of '0' uses SMP-aware broadcast for all message sizes.
+
+    - category    : collective
       name        : ENABLE_SMP_REDUCE
       type        : boolean
       default     : true
@@ -234,6 +243,15 @@ parameters:
         Enable SMP aware reduce.
 
     - category    : collective
+      name        : MAX_SMP_REDUCE_MSG_SIZE
+      type        : int
+      default     : 0
+      class       : device
+      description : >-
+        Maximum message size for which SMP-aware reduce is used.  A
+        value of '0' uses SMP-aware reduce for all message sizes.
+
+    - category    : collective
       name        : ENABLE_SMP_ALLREDUCE
       type        : boolean
       default     : true
@@ -241,6 +259,15 @@ parameters:
       description : >-
         Enable SMP aware allreduce.
 
+    - category    : collective
+      name        : MAX_SMP_ALLREDUCE_MSG_SIZE
+      type        : int
+      default     : 0
+      class       : device
+      description : >-
+        Maximum message size for which SMP-aware allreduce is used.  A
+        value of '0' uses SMP-aware allreduce for all message sizes.
+
     ##############################################################
     # communicator parameters
     - category    : communicator

http://git.mpich.org/mpich.git/commitdiff/60a89bbdbad3d303b54c78b96d285e22b68c0f65

commit 60a89bbdbad3d303b54c78b96d285e22b68c0f65
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed May 15 17:53:42 2013 -0500

    Added ability to enable/disable individual SMP collectives.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 5ef7d37..11191da 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -154,7 +154,7 @@ int MPIR_Allreduce_intra (
 
     is_commutative = MPIR_Op_is_commutative(op);
 
-    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES) {
+    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_PARAM_ENABLE_SMP_ALLREDUCE) {
     /* is the op commutative? We do SMP optimizations only if it is. */
     if (MPIR_Comm_is_node_aware(comm_ptr) && is_commutative) {
         /* on each node, do a reduce to the local root */ 
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 4406d66..8c056e6 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -270,7 +270,8 @@ int MPIR_Barrier_impl(MPID_Comm *comm_ptr, int *errflag)
     else
     {
         if (comm_ptr->comm_kind == MPID_INTRACOMM) {
-            if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_Comm_is_node_aware(comm_ptr)) {
+            if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_PARAM_ENABLE_SMP_BARRIER &&
+                MPIR_Comm_is_node_aware(comm_ptr)) {
 
                 /* do the intranode barrier on all nodes */
                 if (comm_ptr->node_comm != NULL)
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index db0e5c0..c25b714 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -917,7 +917,7 @@ static int MPIR_SMP_Bcast(
     MPI_Status status;
     int recvd_size;
 
-    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES || !MPIR_PARAM_ENABLE_SMP_BCAST)
         MPIU_Assert(0);
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
 
@@ -1150,7 +1150,8 @@ int MPIR_Bcast_intra (
 
     if (count == 0) goto fn_exit;
 
-    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_Comm_is_node_aware(comm_ptr)) {
+    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_PARAM_ENABLE_SMP_BCAST &&
+        MPIR_Comm_is_node_aware(comm_ptr)) {
         mpi_errno = MPIR_SMP_Bcast(buffer, count, datatype, root, comm_ptr, errflag);
         if (mpi_errno) {
             /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/iallreduce.c b/src/mpi/coll/iallreduce.c
index 1d0ccbc..29d573d 100644
--- a/src/mpi/coll/iallreduce.c
+++ b/src/mpi/coll/iallreduce.c
@@ -571,7 +571,7 @@ int MPIR_Iallreduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datat
     MPID_Comm *nc;
     MPID_Comm *nrc;
 
-    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES || !MPIR_PARAM_ENABLE_SMP_ALLREDUCE)
         MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
 
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index fe3f48b..e2b8263 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -671,7 +671,7 @@ int MPIR_Ibcast_SMP(void *buffer, int count, MPI_Datatype datatype, int root, MP
     int mpi_errno = MPI_SUCCESS;
     int type_size, is_homogeneous;
 
-    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES || !MPIR_PARAM_ENABLE_SMP_BCAST)
         MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
 
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index cdf1524..0e05112 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -579,7 +579,7 @@ int MPIR_Ireduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
     MPID_Comm *nrc;
     MPIR_SCHED_CHKPMEM_DECL(1);
 
-    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES || !MPIR_PARAM_ENABLE_SMP_REDUCE)
         MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
     MPIU_Assert(comm_ptr->comm_kind == MPID_INTRACOMM);
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index a13e42b..f343b8e 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -691,7 +691,7 @@ int MPIR_Reduce_intra (
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
 
-    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES) {
+    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_PARAM_ENABLE_SMP_REDUCE) {
     /* is the op commutative? We do SMP optimizations only if it is. */
     if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN)
         is_commutative = 1;
diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index 62cfb7e..4f7d645 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -207,8 +207,39 @@ parameters:
       default     : true
       class       : device
       description : >-
-        The smallest message size that will be used for the pipelined, large-message,
-        ring algorithm in the MPI_Allgatherv implementation.
+        Enable SMP aware collective communication.
+
+    - category    : collective
+      name        : ENABLE_SMP_BARRIER
+      type        : boolean
+      default     : true
+      class       : device
+      description : >-
+        Enable SMP aware barrier.
+
+    - category    : collective
+      name        : ENABLE_SMP_BCAST
+      type        : boolean
+      default     : true
+      class       : device
+      description : >-
+        Enable SMP aware broadcast.
+
+    - category    : collective
+      name        : ENABLE_SMP_REDUCE
+      type        : boolean
+      default     : true
+      class       : device
+      description : >-
+        Enable SMP aware reduce.
+
+    - category    : collective
+      name        : ENABLE_SMP_ALLREDUCE
+      type        : boolean
+      default     : true
+      class       : device
+      description : >-
+        Enable SMP aware allreduce.
 
     ##############################################################
     # communicator parameters

http://git.mpich.org/mpich.git/commitdiff/4456bbeccb7229bfc7ed1bbcb09168afba6349a6

commit 4456bbeccb7229bfc7ed1bbcb09168afba6349a6
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed May 15 16:57:19 2013 -0500

    Make enabling SMP collectives an environment variable instead of a
    configure option.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/configure.ac b/configure.ac
index 7836b1c..b119e92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -444,14 +444,6 @@ AC_ARG_ENABLE(debuginfo,
 	AC_HELP_STRING([--enable-debuginfo], [Enable support for debuggers]),,
 	enable_debuginfo=no)
 
-AC_ARG_ENABLE(smpcoll,
-	AC_HELP_STRING([--enable-smpcoll],
-			[Enable support for SMP/multi-core aware collectives]),
-	smpcoll=$enableval,smpcoll=yes)
-if test $smpcoll = "yes" ; then
-   AC_DEFINE(USE_SMP_COLLECTIVES,1,[define to enable SMP/multi-core aware collectives])
-fi
-
 
 ## Enable creation of libtool-style versioning or no versioning
 AC_ARG_ENABLE(versioning,
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 02999d0..5ef7d37 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -154,7 +154,7 @@ int MPIR_Allreduce_intra (
 
     is_commutative = MPIR_Op_is_commutative(op);
 
-#if defined(USE_SMP_COLLECTIVES)
+    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES) {
     /* is the op commutative? We do SMP optimizations only if it is. */
     if (MPIR_Comm_is_node_aware(comm_ptr) && is_commutative) {
         /* on each node, do a reduce to the local root */ 
@@ -215,8 +215,7 @@ int MPIR_Allreduce_intra (
         }
         goto fn_exit;
     }
-#endif
-            
+    }
     
 #ifdef MPID_HAS_HETERO
     if (comm_ptr->is_hetero)
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 5459204..4406d66 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -270,8 +270,7 @@ int MPIR_Barrier_impl(MPID_Comm *comm_ptr, int *errflag)
     else
     {
         if (comm_ptr->comm_kind == MPID_INTRACOMM) {
-#if defined(USE_SMP_COLLECTIVES)
-            if (MPIR_Comm_is_node_aware(comm_ptr)) {
+            if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_Comm_is_node_aware(comm_ptr)) {
 
                 /* do the intranode barrier on all nodes */
                 if (comm_ptr->node_comm != NULL)
@@ -314,10 +313,6 @@ int MPIR_Barrier_impl(MPID_Comm *comm_ptr, int *errflag)
                 mpi_errno = MPIR_Barrier_intra( comm_ptr, errflag );
                 if (mpi_errno) MPIU_ERR_POP(mpi_errno);
             }
-#else
-            mpi_errno = MPIR_Barrier_intra( comm_ptr, errflag );
-            if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-#endif
         }
         else {
             /* intercommunicator */ 
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index cf9ac0a..db0e5c0 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -917,9 +917,8 @@ static int MPIR_SMP_Bcast(
     MPI_Status status;
     int recvd_size;
 
-#if !defined(USE_SMP_COLLECTIVES)
-    MPIU_Assert(0);
-#endif
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+        MPIU_Assert(0);
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
 
     is_homogeneous = 1;
@@ -1151,8 +1150,7 @@ int MPIR_Bcast_intra (
 
     if (count == 0) goto fn_exit;
 
-#if defined(USE_SMP_COLLECTIVES)
-    if (MPIR_Comm_is_node_aware(comm_ptr)) {
+    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES && MPIR_Comm_is_node_aware(comm_ptr)) {
         mpi_errno = MPIR_SMP_Bcast(buffer, count, datatype, root, comm_ptr, errflag);
         if (mpi_errno) {
             /* for communication errors, just record the error but continue */
@@ -1162,7 +1160,6 @@ int MPIR_Bcast_intra (
         }
         goto fn_exit;
     }
-#endif
 
     comm_size = comm_ptr->local_size;
 
diff --git a/src/mpi/coll/iallreduce.c b/src/mpi/coll/iallreduce.c
index cefa272..1d0ccbc 100644
--- a/src/mpi/coll/iallreduce.c
+++ b/src/mpi/coll/iallreduce.c
@@ -571,9 +571,8 @@ int MPIR_Iallreduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datat
     MPID_Comm *nc;
     MPID_Comm *nrc;
 
-#if !defined(USE_SMP_COLLECTIVES)
-    MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
-#endif
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+        MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
 
     nc = comm_ptr->node_comm;
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index d619407..fe3f48b 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -671,9 +671,8 @@ int MPIR_Ibcast_SMP(void *buffer, int count, MPI_Datatype datatype, int root, MP
     int mpi_errno = MPI_SUCCESS;
     int type_size, is_homogeneous;
 
-#if !defined(USE_SMP_COLLECTIVES)
-    MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
-#endif
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+        MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
 
     is_homogeneous = 1;
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index cedd331..cdf1524 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -579,9 +579,8 @@ int MPIR_Ireduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
     MPID_Comm *nrc;
     MPIR_SCHED_CHKPMEM_DECL(1);
 
-#if !defined(USE_SMP_COLLECTIVES)
-    MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
-#endif
+    if (!MPIR_PARAM_ENABLE_SMP_COLLECTIVES)
+        MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
     MPIU_Assert(comm_ptr->comm_kind == MPID_INTRACOMM);
 
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 8b80ad9..a13e42b 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -685,14 +685,13 @@ int MPIR_Reduce_intra (
     int mpi_errno_ret = MPI_SUCCESS;
     int comm_size, is_commutative, type_size, pof2;
     MPID_Op *op_ptr;
-#if defined(USE_SMP_COLLECTIVES)
     MPIU_CHKLMEM_DECL(1);
-#endif
+
     if (count == 0) return MPI_SUCCESS;
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
 
-#if defined(USE_SMP_COLLECTIVES)
+    if (MPIR_PARAM_ENABLE_SMP_COLLECTIVES) {
     /* is the op commutative? We do SMP optimizations only if it is. */
     if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN)
         is_commutative = 1;
@@ -803,8 +802,7 @@ int MPIR_Reduce_intra (
         
         goto fn_exit;
     }
-#endif
-
+    }
 
     comm_size = comm_ptr->local_size;
 
@@ -841,9 +839,9 @@ int MPIR_Reduce_intra (
   fn_exit:
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
-#if defined(USE_SMP_COLLECTIVES)
+
     MPIU_CHKLMEM_FREEALL();
-#endif
+
     if (mpi_errno_ret)
         mpi_errno = mpi_errno_ret;
     else if (*errflag)
diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index 1df39b2..62cfb7e 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -201,6 +201,15 @@ parameters:
         The smallest message size that will be used for the pipelined, large-message,
         ring algorithm in the MPI_Allgatherv implementation.
 
+    - category    : collective
+      name        : ENABLE_SMP_COLLECTIVES
+      type        : boolean
+      default     : true
+      class       : device
+      description : >-
+        The smallest message size that will be used for the pipelined, large-message,
+        ring algorithm in the MPI_Allgatherv implementation.
+
     ##############################################################
     # communicator parameters
     - category    : communicator

http://git.mpich.org/mpich.git/commitdiff/430514fda404e88a48decbf76e67b06ea21778d0

commit 430514fda404e88a48decbf76e67b06ea21778d0
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed May 15 11:40:09 2013 -0500

    Update parameter generation to allow device-overrides where needed.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/maint/genparams b/maint/genparams
index eb6090c..94c575d 100755
--- a/maint/genparams
+++ b/maint/genparams
@@ -330,7 +330,17 @@ foreach my $p (@{$params->{parameters}}) {
     else {
         $default = fmt_default($p->{name}, $p->{default}, $p->{defaultliteral}, $p->{type});
     }
+
+    if ($p->{class} eq "device") {
+	printf PARAM_C "#if defined MPID_%s\n", $p->{name};
+	printf PARAM_C "%s ${uc_ns}_%s = MPID_%s;\n", type2ctype($p->{type}), $p->{name},
+	               $p->{name};
+	printf PARAM_C "#else\n";
+    }
     printf PARAM_C "%s ${uc_ns}_%s = %s;\n", type2ctype($p->{type}), $p->{name}, $default;
+    if ($p->{class} eq "device") {
+	printf PARAM_C "#endif /* MPID_%s */\n\n", $p->{name};
+    }
 }
 
 # FIXME the mpi_errno bit is MPICH-specific
diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index d8c563e..1df39b2 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -13,6 +13,11 @@
 # Listing "FOO" as a parameter name will cause two environment variables
 # to be examined by default: MPIR_PARAM_FOO and MPICH_FOO, with the
 # MPIR_PARAM value having priority.
+#
+# Each parameter has a class associated with it.  The following
+# classes are defined: "device", and "none".  Setting it to "device"
+# will allow the device to override the default value.
+
 categories:
     - name        : collective
       description : parameters that control collective communication behavior
@@ -52,6 +57,7 @@ parameters:
       name        : ALLTOALL_SHORT_MSG_SIZE
       type        : int
       default     : 256
+      class       : device
       description : >-
         the short message algorithm will be used if the per-destination
         message size (sendcount*size(sendtype)) is <= this value
@@ -60,6 +66,7 @@ parameters:
       name        : ALLTOALL_MEDIUM_MSG_SIZE
       type        : int
       default     : 32768
+      class       : device
       description : >-
         the medium message algorithm will be used if the per-destination
         message size (sendcount*size(sendtype)) is <= this value and
@@ -69,6 +76,7 @@ parameters:
       name        : ALLTOALL_THROTTLE
       type        : int
       default     : 32
+      class       : device
       description : >-
         max no. of irecvs/isends posted at a time in some alltoall
         algorithms. Setting it to 0 causes all irecvs/isends to be
@@ -78,6 +86,7 @@ parameters:
       name        : REDSCAT_COMMUTATIVE_LONG_MSG_SIZE
       type        : int
       default     : 524288
+      class       : device
       description : >-
         the long message algorithm will be used if the operation is commutative
         and the send buffer size is >= this value (in bytes)
@@ -86,6 +95,7 @@ parameters:
       name        : BCAST_MIN_PROCS
       type        : int
       default     : 8
+      class       : device
       description : >-
         the minimum number of processes in a communicator to use a non-binomial
         broadcast algorithm
@@ -94,6 +104,7 @@ parameters:
       name        : BCAST_SHORT_MSG_SIZE
       type        : int
       default     : 12288
+      class       : device
       description : >-
         the short message algorithm will be used if the send buffer size is <
         this value (in bytes)
@@ -102,6 +113,7 @@ parameters:
       name        : BCAST_LONG_MSG_SIZE
       type        : int
       default     : 524288
+      class       : device
       description : >-
         the long message algorithm will be used if the send buffer size is >=
         this value (in bytes)
@@ -110,6 +122,7 @@ parameters:
       name        : ALLGATHER_SHORT_MSG_SIZE
       type        : int
       default     : 81920
+      class       : device
       description : >-
         For MPI_Allgather and MPI_Allgatherv, the short message algorithm will
         be used if the send buffer size is < this value (in bytes).
@@ -118,6 +131,7 @@ parameters:
       name        : ALLGATHER_LONG_MSG_SIZE
       type        : int
       default     : 524288
+      class       : device
       description : >-
         For MPI_Allgather and MPI_Allgatherv, the long message algorithm will be
         used if the send buffer size is >= this value (in bytes)
@@ -126,6 +140,7 @@ parameters:
       name        : REDUCE_SHORT_MSG_SIZE
       type        : int
       default     : 2048
+      class       : device
       description : >-
         the short message algorithm will be used if the send buffer size is <=
         this value (in bytes)
@@ -134,6 +149,7 @@ parameters:
       name        : ALLREDUCE_SHORT_MSG_SIZE
       type        : int
       default     : 2048
+      class       : device
       description : >-
         the short message algorithm will be used if the send buffer size is <=
         this value (in bytes)
@@ -142,6 +158,7 @@ parameters:
       name        : GATHER_VSMALL_MSG_SIZE
       type        : int
       default     : 1024
+      class       : device
       description : >-
         use a temporary buffer for intracommunicator MPI_Gather if the send
         buffer size is < this value (in bytes)
@@ -150,6 +167,7 @@ parameters:
       name        : GATHER_INTER_SHORT_MSG_SIZE
       type        : int
       default     : 2048
+      class       : device
       description : >-
         use the short message algorithm for intercommunicator MPI_Gather if the
         send buffer size is < this value (in bytes)
@@ -158,6 +176,7 @@ parameters:
       name        : GATHERV_INTER_SSEND_MIN_PROCS
       type        : int
       default     : 32
+      class       : device
       description : >-
         Use Ssend (synchronous send) for intercommunicator MPI_Gatherv if the
         "group B" size is >= this value.  Specifying "-1" always avoids using
@@ -168,6 +187,7 @@ parameters:
       name        : SCATTER_INTER_SHORT_MSG_SIZE
       type        : int
       default     : 2048
+      class       : device
       description : >-
         use the short message algorithm for intercommunicator MPI_Scatter if the
         send buffer size is < this value (in bytes)
@@ -176,6 +196,7 @@ parameters:
       name        : ALLGATHERV_PIPELINE_MSG_SIZE
       type        : int
       default     : 32768
+      class       : device
       description : >-
         The smallest message size that will be used for the pipelined, large-message,
         ring algorithm in the MPI_Allgatherv implementation.
@@ -186,6 +207,7 @@ parameters:
       name        : COMM_SPLIT_USE_QSORT
       type        : boolean
       default     : true
+      class       : device
       description : >-
         Use qsort(3) in the implementation of MPI_Comm_split instead of bubble sort.
 
@@ -195,6 +217,7 @@ parameters:
       name        : DEBUG_HOLD
       type        : boolean
       default     : false
+      class       : device
       description : >-
         If true, causes processes to wait in MPI_Init and
         MPI_Initthread for a debugger to be attached.  Once the
@@ -206,6 +229,7 @@ parameters:
       name        : PROCTABLE_SIZE
       type        : int
       default     : 64
+      class       : device
       description : >-
         Size of the "MPIR" debugger interface proctable (process table).
 
@@ -213,6 +237,7 @@ parameters:
       name        : PROCTABLE_PRINT
       type        : boolean
       default     : true
+      class       : device
       description : >-
         If true, dump the proctable entries at MPIR_WaitForDebugger-time.
         (currently compile-time disabled by "#if 0")
@@ -223,6 +248,7 @@ parameters:
       name        : ENABLE_COLL_FT_RET
       type        : boolean
       default     : false
+      class       : device
       description : >-
         NOT COMPATIBLE WITH NONBLOCKING COLLECTIVES (see tt#1601)!!!
         Collectives called on a communicator with a failed process
@@ -237,6 +263,7 @@ parameters:
       name        : ABORT_ON_LEAKED_HANDLES
       type        : boolean
       default     : false
+      class       : device
       description : >-
         If true, MPI will call MPI_Abort at MPI_Finalize if any MPI object
         handles have been leaked.  For example, if MPI_Comm_dup is called
@@ -252,6 +279,7 @@ parameters:
       name        : CTXID_EAGER_SIZE
       type        : int
       default     : 2
+      class       : device
       description : >-
         The MPIR_PARAM_CTXID_EAGER_SIZE environment variable allows you to
         specify how many words in the context ID mask will be set aside
@@ -264,6 +292,7 @@ parameters:
       name        : MEMDUMP
       type        : boolean
       default     : true
+      class       : device
       description : >-
         If true, list any memory that was allocated by MPICH and that
         remains allocated when MPI_Finalize completes.
@@ -272,6 +301,7 @@ parameters:
       name        : ERROR_CHECKING
       type        : boolean
       default     : true
+      class       : device
       description : >-
         If true, perform checks for errors, typically to verify valid inputs
         to MPI routines.  Only effective when MPICH is configured with
@@ -281,6 +311,7 @@ parameters:
       name        : PRINT_ERROR_STACK
       type        : boolean
       default     : true
+      class       : device
       description : >-
         If true, print an error stack trace at error handling time.
 
@@ -288,6 +319,7 @@ parameters:
       name        : CHOP_ERROR_STACK
       type        : int
       default     : 0
+      class       : device
       description : >-
         If >0, truncate error stack output lines this many characters
         wide.  If 0, do not truncate, and if <0 use a sensible default.
@@ -298,6 +330,7 @@ parameters:
       name        : CH3_RMA_ACC_IMMED
       type        : boolean
       default     : true
+      class       : none
       description : >-
         Use the immediate accumulate optimization
 
@@ -305,6 +338,7 @@ parameters:
       name        : CH3_RMA_NREQUEST_THRESHOLD
       type        : int
       default     : 4000
+      class       : none
       description : >-
         Threshold at which the RMA implementation attempts to complete requests
         while completing RMA operations and while using the lazy synchonization
@@ -315,6 +349,7 @@ parameters:
       name        : CH3_RMA_NREQUEST_NEW_THRESHOLD
       type        : int
       default     : 128
+      class       : none
       description : >-
         Threshold for the number of new requests since the last attempt to
         complete pending requests.  Higher values can increase performance,
@@ -325,6 +360,7 @@ parameters:
       name        : CH3_RMA_LOCK_IMMED
       type        : boolean
       default     : false
+      class       : none
       description : >-
         Issue a request for the passive target RMA lock immediately.  Default
         behavior is to defer the lock request until the call to MPI_Win_unlock.
@@ -333,6 +369,7 @@ parameters:
       name        : CH3_RMA_MERGE_LOCK_OP_UNLOCK
       type        : boolean
       default     : true
+      class       : none
       description : >-
         Enable/disable an optimization that merges lock, op, and unlock
         messages, for single-operation passive target epochs.
@@ -343,6 +380,7 @@ parameters:
                     - CH3_NO_LOCAL
       type        : boolean
       default     : false
+      class       : none
       description : >-
         If true, force all processes to operate as though all processes
         are located on another node.  For example, this disables shared
@@ -354,6 +392,7 @@ parameters:
                     - CH3_EVEN_ODD_CLIQUES
       type        : boolean
       default     : false
+      class       : none
       description : >-
         If true, odd procs on a node are seen as local to each other, and even
         procs on a node are seen as local to each other.  Used for debugging on
@@ -365,6 +404,7 @@ parameters:
                     - INTERFACE_HOSTNAME
       type        : string
       defaultliteral : NULL
+      class       : none
       description : >-
         If non-NULL, this parameter specifies the IP address that
         other processes should use when connecting to this process.
@@ -376,6 +416,7 @@ parameters:
       name        : CH3_EAGER_MAX_MSG_SIZE
       type        : int
       default     : 131072
+      class       : none
       description : >-
         This parameter controls the message size at which CH3 switches
         from eager to rendezvous mode.
@@ -387,6 +428,7 @@ parameters:
                     - PORT_RANGE
       type        : range
       default     : "0:0"
+      class       : none
       description : >-
         The MPIR_PARAM_CH3_PORT_RANGE environment variable allows you to
         specify the range of TCP ports to be used by the process
@@ -399,6 +441,7 @@ parameters:
       name        : NEMESIS_POLLS_BEFORE_YIELD
       type        : int
       default     : 1000
+      class       : none
       description : >-
         When MPICH is in a busy waiting loop, it will periodically
         call a function to yield the processor.  This parameter sets
@@ -409,6 +452,7 @@ parameters:
       name        : NEMESIS_LMT_DMA_THRESHOLD
       type        : int
       default     : 2097152
+      class       : none
       description : >-
         Messages larger than this size will use the "dma" (knem)
         intranode LMT implementation, if it is enabled and available.
@@ -417,6 +461,7 @@ parameters:
       name        : NEMESIS_NETMOD
       type        : string
       default     : ""
+      class       : none
       description : >-
         If non-empty, this parameter specifies which network module
         should be used for communication.
@@ -425,6 +470,7 @@ parameters:
       name        : NEMESIS_SHM_EAGER_MAX_SZ
       type        : int
       default     : -1
+      class       : none
       description : >-
         This parameter controls the message size at which Nemesis
         switches from eager to rendezvous mode for shared memory.
@@ -435,6 +481,7 @@ parameters:
       name        : NEMESIS_SHM_READY_EAGER_MAX_SZ
       type        : int
       default     : -2
+      class       : none
       description : >-
         This parameter controls the message size at which Nemesis
         switches from eager to rendezvous mode for ready-send
@@ -446,6 +493,7 @@ parameters:
       name        : NEMESIS_ENABLE_CKPOINT
       type        : boolean
       default     : false
+      class       : none
       description : >-
         If true, enables checkpointing support and returns an error if
         checkpointing library cannot be initialized.
@@ -458,6 +506,7 @@ parameters:
                     - NETWORK_IFACE
       type        : string
       defaultliteral : NULL
+      class       : none
       description : >-
         If non-NULL, this parameter specifies which pseudo-ethernet
         interface the tcp netmod should use (e.g., "eth1", "ib0").
@@ -470,6 +519,7 @@ parameters:
       name        : NEMESIS_TCP_HOST_LOOKUP_RETRIES
       type        : int
       default     : 10
+      class       : none
       description : >-
         This parameter controls the number of times to retry the
         gethostbyname() function before giving up.
@@ -480,6 +530,7 @@ parameters:
       name        : NEMESIS_PORTALS_COMM_OVERRIDES
       type        : boolean
       default     : true
+      class       : none
       description : >-
         If set to false, communication override functionality will be
         disabled for netmods that provide the override feature.

http://git.mpich.org/mpich.git/commitdiff/c6084635dec65194544475604890cf50896fdcf2

commit c6084635dec65194544475604890cf50896fdcf2
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed May 15 00:22:53 2013 -0500

    Better arrange environment variables according to their categories.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index 93c50e8..d8c563e 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -156,9 +156,6 @@ parameters:
 
     - category    : collective
       name        : GATHERV_INTER_SSEND_MIN_PROCS
-      # backwards compatibility
-      abs-alt-env :
-                    - MPICH_GATHERV_MIN_PROCS
       type        : int
       default     : 32
       description : >-
@@ -191,36 +188,140 @@ parameters:
       default     : true
       description : >-
         Use qsort(3) in the implementation of MPI_Comm_split instead of bubble sort.
+
+  ##############################################################
+    # debugging parameters
+    - category    : debugger
+      name        : DEBUG_HOLD
+      type        : boolean
+      default     : false
+      description : >-
+        If true, causes processes to wait in MPI_Init and
+        MPI_Initthread for a debugger to be attached.  Once the
+        debugger has attached, the variable 'hold' should be set to 0
+        in order to allow the process to continue (e.g., in gdb, "set
+        hold=0").
+
+    - category    : debugger
+      name        : PROCTABLE_SIZE
+      type        : int
+      default     : 64
+      description : >-
+        Size of the "MPIR" debugger interface proctable (process table).
+
+    - category    : debugger
+      name        : PROCTABLE_PRINT
+      type        : boolean
+      default     : true
+      description : >-
+        If true, dump the proctable entries at MPIR_WaitForDebugger-time.
+        (currently compile-time disabled by "#if 0")
+
+  ##############################################################
+    # fault-tolerance parameters
+    - category    : fault_tolerance
+      name        : ENABLE_COLL_FT_RET
+      type        : boolean
+      default     : false
+      description : >-
+        NOT COMPATIBLE WITH NONBLOCKING COLLECTIVES (see tt#1601)!!!
+        Collectives called on a communicator with a failed process
+        should not hang, however the result of the operation may be
+        invalid even though the function returns MPI_SUCCESS.  This
+        option enables an experimental feature that will return an error
+        if the result of the collective is invalid.
+
+  ##############################################################
+    # memory parameters
+    - category    : memory
+      name        : ABORT_ON_LEAKED_HANDLES
+      type        : boolean
+      default     : false
+      description : >-
+        If true, MPI will call MPI_Abort at MPI_Finalize if any MPI object
+        handles have been leaked.  For example, if MPI_Comm_dup is called
+        without calling a corresponding MPI_Comm_free.  For uninteresting
+        reasons, enabling this option may prevent all known object leaks from
+        being reported.  MPICH must have been configure with
+        "--enable-g=handlealloc" or better in order for this functionality to
+        work.
+
+  ############################
+    # threads parameters
+    - category    : threads
+      name        : CTXID_EAGER_SIZE
+      type        : int
+      default     : 2
+      description : >-
+        The MPIR_PARAM_CTXID_EAGER_SIZE environment variable allows you to
+        specify how many words in the context ID mask will be set aside
+        for the eager allocation protocol.  If the application is running
+        out of context IDs, reducing this value may help.
+
+    ##############################################################
+    # other MPI-level parameters
+    - category    : developer
+      name        : MEMDUMP
+      type        : boolean
+      default     : true
+      description : >-
+        If true, list any memory that was allocated by MPICH and that
+        remains allocated when MPI_Finalize completes.
+
+    - category    : error_handling
+      name        : ERROR_CHECKING
+      type        : boolean
+      default     : true
+      description : >-
+        If true, perform checks for errors, typically to verify valid inputs
+        to MPI routines.  Only effective when MPICH is configured with
+        --enable-error-checking=runtime .
+
+    - category    : error_handling
+      name        : PRINT_ERROR_STACK
+      type        : boolean
+      default     : true
+      description : >-
+        If true, print an error stack trace at error handling time.
+
+    - category    : error_handling
+      name        : CHOP_ERROR_STACK
+      type        : int
+      default     : 0
+      description : >-
+        If >0, truncate error stack output lines this many characters
+        wide.  If 0, do not truncate, and if <0 use a sensible default.
+
     ##############################################################
-    # RMA parameters
-    - category    : rma
+    # ch3 parameters
+    - category    : ch3
       name        : CH3_RMA_ACC_IMMED
       type        : boolean
       default     : true
       description : >-
         Use the immediate accumulate optimization
 
-    - category    : rma
+    - category    : ch3
       name        : CH3_RMA_NREQUEST_THRESHOLD
       type        : int
       default     : 4000
       description : >-
         Threshold at which the RMA implementation attempts to complete requests
         while completing RMA operations and while using the lazy synchonization
-        approach.  Change this value if programs fail because they run out of 
+        approach.  Change this value if programs fail because they run out of
         requests or other internal resources
 
-    - category    : rma
+    - category    : ch3
       name        : CH3_RMA_NREQUEST_NEW_THRESHOLD
       type        : int
       default     : 128
       description : >-
         Threshold for the number of new requests since the last attempt to
-        complete pending requests.  Higher values can increase performance, 
+        complete pending requests.  Higher values can increase performance,
         but may run the risk of exceeding the available number of requests
         or other internal resources.
 
-    - category    : rma
+    - category    : ch3
       name        : CH3_RMA_LOCK_IMMED
       type        : boolean
       default     : false
@@ -228,7 +329,7 @@ parameters:
         Issue a request for the passive target RMA lock immediately.  Default
         behavior is to defer the lock request until the call to MPI_Win_unlock.
 
-    - category    : rma
+    - category    : ch3
       name        : CH3_RMA_MERGE_LOCK_OP_UNLOCK
       type        : boolean
       default     : true
@@ -236,9 +337,7 @@ parameters:
         Enable/disable an optimization that merges lock, op, and unlock
         messages, for single-operation passive target epochs.
 
-    ##############################################################
-    # intranode communication parameters
-    - category    : intranode
+    - category    : ch3
       name        : CH3_NOLOCAL
       alt-env     :
                     - CH3_NO_LOCAL
@@ -249,7 +348,7 @@ parameters:
         are located on another node.  For example, this disables shared
         memory communication hierarchical collectives.
 
-    - category    : intranode
+    - category    : ch3
       name        : CH3_ODD_EVEN_CLIQUES
       alt-env     :
                     - CH3_EVEN_ODD_CLIQUES
@@ -260,67 +359,55 @@ parameters:
         procs on a node are seen as local to each other.  Used for debugging on
         a single machine.
 
-    - category    : intranode
-      name        : NEMESIS_POLLS_BEFORE_YIELD
-      type        : int
-      default     : 1000
-      description : >-
-        When MPICH is in a busy waiting loop, it will periodically
-        call a function to yield the processor.  This parameter sets
-        the number of loops before the yield function is called.  A 
-        value of 0 disables yielding.
-
-    - category    : developer
-      name        : MEMDUMP
-      type        : boolean
-      default     : true
+    - category    : ch3
+      name        : CH3_INTERFACE_HOSTNAME
+      alt-env     :
+                    - INTERFACE_HOSTNAME
+      type        : string
+      defaultliteral : NULL
       description : >-
-        If true, list any memory that was allocated by MPICH and that
-        remains allocated when MPI_Finalize completes.
+        If non-NULL, this parameter specifies the IP address that
+        other processes should use when connecting to this process.
+        This parameter is mutually exclusive with the
+        MPIR_PARAM_CH3_NETWORK_IFACE parameter and it is an error to set them
+        both.
 
-    - category    : debugger
-      name        : PROCTABLE_SIZE
+    - category    : ch3
+      name        : CH3_EAGER_MAX_MSG_SIZE
       type        : int
-      default     : 64
-      description : >-
-        Size of the "MPIR" debugger interface proctable (process table).
-
-    - category    : debugger
-      name        : PROCTABLE_PRINT
-      type        : boolean
-      default     : true
-      description : >-
-        If true, dump the proctable entries at MPIR_WaitForDebugger-time.
-        (currently compile-time disabled by "#if 0")
-
-    - category    : error_handling
-      name        : ERROR_CHECKING
-      type        : boolean
-      default     : true
+      default     : 131072
       description : >-
-        If true, perform checks for errors, typically to verify valid inputs
-        to MPI routines.  Only effective when MPICH is configured with
-        --enable-error-checking=runtime .
+        This parameter controls the message size at which CH3 switches
+        from eager to rendezvous mode.
 
-    - category    : error_handling
-      name        : PRINT_ERROR_STACK
-      type        : boolean
-      default     : true
+    - category    : ch3
+      name        : CH3_PORT_RANGE
+      alt-env     :
+                    - PORTRANGE
+                    - PORT_RANGE
+      type        : range
+      default     : "0:0"
       description : >-
-        If true, print an error stack trace at error handling time.
+        The MPIR_PARAM_CH3_PORT_RANGE environment variable allows you to
+        specify the range of TCP ports to be used by the process
+        manager and the MPICH library. The format of this variable is
+        <low>:<high>.
 
-    - category    : error_handling
-      name        : CHOP_ERROR_STACK
+    ##############################################################
+    # nemesis parameters
+    - category    : nemesis
+      name        : NEMESIS_POLLS_BEFORE_YIELD
       type        : int
-      default     : 0
+      default     : 1000
       description : >-
-        If >0, truncate error stack output lines this many characters
-        wide.  If 0, do not truncate, and if <0 use a sensible default.
+        When MPICH is in a busy waiting loop, it will periodically
+        call a function to yield the processor.  This parameter sets
+        the number of loops before the yield function is called.  A
+        value of 0 disables yielding.
 
-    - category    : intranode
+    - category    : nemesis
       name        : NEMESIS_LMT_DMA_THRESHOLD
       type        : int
-      # 2048*1024 == 2MiB
       default     : 2097152
       description : >-
         Messages larger than this size will use the "dma" (knem)
@@ -335,46 +422,11 @@ parameters:
         should be used for communication.
 
     - category    : nemesis
-      name        : CH3_INTERFACE_HOSTNAME
-      alt-env     :
-                    - INTERFACE_HOSTNAME
-      type        : string
-      defaultliteral : NULL
-      description : >-
-        If non-NULL, this parameter specifies the IP address that
-        other processes should use when connecting to this process.
-        This parameter is mutually exclusive with the
-        MPIR_PARAM_CH3_NETWORK_IFACE parameter and it is an error to set them
-        both.
-
-    - category    : nemesis
-      name        : NEMESIS_TCP_NETWORK_IFACE
-      alt-env     :
-                    - NETWORK_IFACE
-      type        : string
-      defaultliteral : NULL
-      description : >-
-        If non-NULL, this parameter specifies which pseudo-ethernet
-        interface the tcp netmod should use (e.g., "eth1", "ib0"). 
-        Note, this is a Linux-specific parameter.
-        This parameter is mutually exclusive with the
-        MPICH_INTERFACE_HOSTNAME parameter and it is an error to set
-        them both.
-
-    - category    : nemesis
-      name        : NEMESIS_TCP_HOST_LOOKUP_RETRIES
-      type        : int
-      default     : 10
-      description : >-
-        This parameter controls the number of times to retry the 
-        gethostbyname() function before giving up.
-
-    - category    : nemesis
       name        : NEMESIS_SHM_EAGER_MAX_SZ
       type        : int
       default     : -1
       description : >-
-        This parameter controls the message size at which Nemesis 
+        This parameter controls the message size at which Nemesis
         switches from eager to rendezvous mode for shared memory.
         If this parameter is set to -1, then Nemesis will choose
         an appropriate value.
@@ -391,40 +443,6 @@ parameters:
         then Nemesis will choose an appropriate value.
 
     - category    : nemesis
-      name        : NEMESIS_PORTALS_COMM_OVERRIDES
-      type        : boolean
-      default     : true
-      description : >-
-        If set to false, communication override functionality will be
-        disabled for netmods that provide the override feature.
-        # Note the netmod must implement this functionality by not
-        # setting the comm_ops table in any VC.
-
-    - category    : ch3
-      name        : CH3_EAGER_MAX_MSG_SIZE
-      type        : int
-      default     : 131072
-      description : >-
-        This parameter controls the message size at which CH3 switches
-        from eager to rendezvous mode.
-
-
-  ##############################################################
-    # debugging parameters
-    - category    : debugger
-      name        : DEBUG_HOLD
-      type        : boolean
-      default     : false
-      description : >-
-        If true, causes processes to wait in MPI_Init and
-        MPI_Initthread for a debugger to be attached.  Once the
-        debugger has attached, the variable 'hold' should be set to 0
-        in order to allow the process to continue (e.g., in gdb, "set
-        hold=0").
-
-  ##############################################################
-    # checkpointing parameters
-    - category    : checkpointing
       name        : NEMESIS_ENABLE_CKPOINT
       type        : boolean
       default     : false
@@ -432,61 +450,41 @@ parameters:
         If true, enables checkpointing support and returns an error if
         checkpointing library cannot be initialized.
 
-  ##############################################################
-    # fault-tolerance parameters
-    - category    : fault_tolerance
-      name        : ENABLE_COLL_FT_RET
-      type        : boolean
-      default     : false
-      description : >-
-        NOT COMPATIBLE WITH NONBLOCKING COLLECTIVES (see tt#1601)!!!
-        Collectives called on a communicator with a failed process
-        should not hang, however the result of the operation may be
-        invalid even though the function returns MPI_SUCCESS.  This
-        option enables an experimental feature that will return an error
-        if the result of the collective is invalid.
-
-  ##############################################################
-    # memory parameters
-    - category    : memory
-      name        : ABORT_ON_LEAKED_HANDLES
-      type        : boolean
-      default     : false
+    ##############################################################
+    # nemesis TCP parameters
+    - category    : nemesis
+      name        : NEMESIS_TCP_NETWORK_IFACE
+      alt-env     :
+                    - NETWORK_IFACE
+      type        : string
+      defaultliteral : NULL
       description : >-
-        If true, MPI will call MPI_Abort at MPI_Finalize if any MPI object
-        handles have been leaked.  For example, if MPI_Comm_dup is called
-        without calling a corresponding MPI_Comm_free.  For uninteresting
-        reasons, enabling this option may prevent all known object leaks from
-        being reported.  MPICH must have been configure with
-        "--enable-g=handlealloc" or better in order for this functionality to
-        work.
+        If non-NULL, this parameter specifies which pseudo-ethernet
+        interface the tcp netmod should use (e.g., "eth1", "ib0").
+        Note, this is a Linux-specific parameter.
+        This parameter is mutually exclusive with the
+        MPIR_PARAM_CH3_INTERFACE_HOSTNAME parameter and it is an error to set
+        them both.
 
-  ############################
-    # sockets parameters
-    - category    : sockets
-      name        : CH3_PORT_RANGE
-      alt-env     : 
-                    - PORTRANGE
-                    - PORT_RANGE
-      type        : range
-      default     : "0:0"
+    - category    : nemesis
+      name        : NEMESIS_TCP_HOST_LOOKUP_RETRIES
+      type        : int
+      default     : 10
       description : >-
-        The MPICH_PORT_RANGE environment variable allows you to
-        specify the range of TCP ports to be used by the process
-        manager and the MPICH library. The format of this variable is
-        <low>:<high>.
+        This parameter controls the number of times to retry the
+        gethostbyname() function before giving up.
 
-  ############################
-    # threads parameters
-    - category    : threads
-      name        : CTXID_EAGER_SIZE
-      type        : int
-      default     : 2
+    ##############################################################
+    # nemesis portals parameters
+    - category    : nemesis
+      name        : NEMESIS_PORTALS_COMM_OVERRIDES
+      type        : boolean
+      default     : true
       description : >-
-        The MPICH_CTXID_EAGER_SIZE environment variable allows you to
-        specify how many words in the context ID mask will be set aside
-        for the eager allocation protocol.  If the application is running
-        out of context IDs, reducing this value may help.
+        If set to false, communication override functionality will be
+        disabled for netmods that provide the override feature.
+        # Note the netmod must implement this functionality by not
+        # setting the comm_ops table in any VC.
 
 ...
 

http://git.mpich.org/mpich.git/commitdiff/fa950cb50d36b94397604db30546b41dc60f0e77

commit fa950cb50d36b94397604db30546b41dc60f0e77
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Tue May 14 21:51:07 2013 -0500

    Make parameter names consistent.
    
    All CH3 parameters start with CH3_ now.  All nemesis parameters start
    with NEMESIS_.  For netmod specific parameters, we use
    NEMESIS_<netmod>_.
    
    Reviewed by Charles Archer @ IBM.

diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
index e784524..1863ba0 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
@@ -234,16 +234,16 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname,
     MPIU_Assert(maxIfname);
     ifname[0] = '\0';
 
-    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_INTERFACE_HOSTNAME && MPIR_PARAM_NETWORK_IFACE, mpi_errno, MPI_ERR_OTHER, "**ifname_and_hostname");
+    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_CH3_INTERFACE_HOSTNAME && MPIR_PARAM_NEMESIS_TCP_NETWORK_IFACE, mpi_errno, MPI_ERR_OTHER, "**ifname_and_hostname");
     
     /* Set "not found" for ifaddr */
     ifaddr->len = 0;
 
     /* Check if user specified ethernet interface name, e.g., ib0, eth1 */
-    if (MPIR_PARAM_NETWORK_IFACE) {
+    if (MPIR_PARAM_NEMESIS_TCP_NETWORK_IFACE) {
 	int len;
-        mpi_errno = MPIDI_Get_IP_for_iface(MPIR_PARAM_NETWORK_IFACE, ifaddr, &ifaddrFound);
-        MPIU_ERR_CHKANDJUMP1(mpi_errno || !ifaddrFound, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", "**iface_notfound %s", MPIR_PARAM_NETWORK_IFACE);
+        mpi_errno = MPIDI_Get_IP_for_iface(MPIR_PARAM_NEMESIS_TCP_NETWORK_IFACE, ifaddr, &ifaddrFound);
+        MPIU_ERR_CHKANDJUMP1(mpi_errno || !ifaddrFound, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", "**iface_notfound %s", MPIR_PARAM_NEMESIS_TCP_NETWORK_IFACE);
         
         MPIU_DBG_MSG_FMT(CH3_CONNECT, VERBOSE, (MPIU_DBG_FDEST,
                                                 "ifaddrFound=TRUE ifaddr->type=%d ifaddr->len=%d ifaddr->ifaddr[0-3]=%#08x",
@@ -256,7 +256,7 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname,
     }
 
     /* Check for a host name supplied through an environment variable */
-    ifname_string = MPIR_PARAM_INTERFACE_HOSTNAME;
+    ifname_string = MPIR_PARAM_CH3_INTERFACE_HOSTNAME;
     if (!ifname_string) {
 	/* See if there is a per-process name for the interfaces (e.g.,
 	   the process manager only delievers the same values for the 
@@ -305,7 +305,7 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname,
     if (!ifaddrFound) {
         int i;
 	struct hostent *info = NULL;
-        for (i = 0; i < MPIR_PARAM_HOST_LOOKUP_RETRIES; ++i) {
+        for (i = 0; i < MPIR_PARAM_NEMESIS_TCP_HOST_LOOKUP_RETRIES; ++i) {
             info = gethostbyname( ifname_string );
             if (info || h_errno != TRY_AGAIN)
                 break;
@@ -558,11 +558,11 @@ int MPID_nem_tcp_bind (int sockfd)
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_BIND);
    
-    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_PORT_RANGE.low < 0 || MPIR_PARAM_PORT_RANGE.low > MPIR_PARAM_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
+    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_CH3_PORT_RANGE.low < 0 || MPIR_PARAM_CH3_PORT_RANGE.low > MPIR_PARAM_CH3_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
 
     /* default MPICH_PORT_RANGE is {0,0} so bind will use any available port */
     ret = 0;
-    for (port = MPIR_PARAM_PORT_RANGE.low; port <= MPIR_PARAM_PORT_RANGE.high; ++port)
+    for (port = MPIR_PARAM_CH3_PORT_RANGE.low; port <= MPIR_PARAM_CH3_PORT_RANGE.high; ++port)
     {
         memset ((void *)&sin, 0, sizeof(sin));
         sin.sin_family      = AF_INET;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c b/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c
index 86e42fb..0d04c1d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c
@@ -421,13 +421,13 @@ int MPID_nem_newtcp_module_bind (MPIU_SOCKW_Sockfd_t sockfd)
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_NEWTCP_MODULE_BIND);
    
-    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_PORT_RANGE.low < 0 || MPIR_PARAM_PORT_RANGE.low > MPIR_PARAM_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
+    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_CH3_PORT_RANGE.low < 0 || MPIR_PARAM_CH3_PORT_RANGE.low > MPIR_PARAM_CH3_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
 
     memset((void *)&sin, 0, sizeof(sin));
     sin.sin_family      = AF_INET;
     sin.sin_addr.s_addr = htonl(INADDR_ANY);
 
-    mpi_errno = MPIU_SOCKW_Bind_port_range(sockfd, &sin, MPIR_PARAM_PORT_RANGE.low, MPIR_PARAM_PORT_RANGE.high);
+    mpi_errno = MPIU_SOCKW_Bind_port_range(sockfd, &sin, MPIR_PARAM_CH3_PORT_RANGE.low, MPIR_PARAM_CH3_PORT_RANGE.high);
     if(mpi_errno != MPI_SUCCESS) MPIU_ERR_POP(mpi_errno);
 
  fn_exit:
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
index 19df691..a928362 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
@@ -513,15 +513,15 @@ MPID_nem_vc_init (MPIDI_VC_t *vc)
         vc_ch->lmt_active_lmt      = NULL;
         vc_ch->lmt_enqueued        = FALSE;
 
-        if (MPIR_PARAM_SHM_EAGER_MAX_SZ == -1)
+        if (MPIR_PARAM_NEMESIS_SHM_EAGER_MAX_SZ == -1)
             vc->eager_max_msg_sz = MPID_NEM_MPICH_DATA_LEN - sizeof(MPIDI_CH3_Pkt_t);
         else
-            vc->eager_max_msg_sz = MPIR_PARAM_SHM_EAGER_MAX_SZ;
+            vc->eager_max_msg_sz = MPIR_PARAM_NEMESIS_SHM_EAGER_MAX_SZ;
 
-        if (MPIR_PARAM_SHM_READY_EAGER_MAX_SZ == -2)
+        if (MPIR_PARAM_NEMESIS_SHM_READY_EAGER_MAX_SZ == -2)
             vc->ready_eager_max_msg_sz = vc->eager_max_msg_sz; /* force local ready sends to use LMT */
         else
-            vc->ready_eager_max_msg_sz = MPIR_PARAM_SHM_READY_EAGER_MAX_SZ;
+            vc->ready_eager_max_msg_sz = MPIR_PARAM_NEMESIS_SHM_READY_EAGER_MAX_SZ;
 
         MPIU_DBG_MSG(VC, VERBOSE, "vc using shared memory");
     }
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 6ee752f..3c73497 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -379,8 +379,8 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
 		   this, significant overhead is added once the
 		   number of requests exceeds the threshold, since the
 		   number that are completed in a call may be small. */
-		if (nRequest > MPIR_PARAM_RMA_NREQUEST_THRESHOLD && 
-		    nRequest - nRequestNew > MPIR_PARAM_RMA_NREQUEST_NEW_THRESHOLD) {
+		if (nRequest > MPIR_PARAM_CH3_RMA_NREQUEST_THRESHOLD &&
+		    nRequest - nRequestNew > MPIR_PARAM_CH3_RMA_NREQUEST_NEW_THRESHOLD) {
 		    int nDone = 0;
                     MPIDI_CH3I_RMAListPartialComplete(win_ptr, ops_list, curr_ptr, &nDone);
 		    /* if (nDone > 0) printf( "nDone = %d\n", nDone ); */
@@ -875,7 +875,7 @@ static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *rma_op,
     MPID_Datatype_get_size_macro(rma_op->origin_datatype, origin_type_size);
     /* FIXME: Make this size check efficient and match the packet type */
     len = rma_op->origin_count * origin_type_size;
-    if (MPIR_PARAM_RMA_ACC_IMMED && len <= MPIDI_RMA_IMMED_INTS*sizeof(int)) {
+    if (MPIR_PARAM_CH3_RMA_ACC_IMMED && len <= MPIDI_RMA_IMMED_INTS*sizeof(int)) {
 	MPIDI_CH3_Pkt_accum_immed_t * accumi_pkt = &upkt.accum_immed;
 	void *dest = accumi_pkt->data, *src = rma_op->origin_addr;
 	
@@ -1675,8 +1675,8 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
 	    nRequest++;
 	    MPIU_INSTR_COUNTER_INCR(wincomplete_reqs,1);
 	    curr_ptr    = curr_ptr->next;
-	    if (nRequest > MPIR_PARAM_RMA_NREQUEST_THRESHOLD && 
-		nRequest - nRequestNew > MPIR_PARAM_RMA_NREQUEST_NEW_THRESHOLD) {
+	    if (nRequest > MPIR_PARAM_CH3_RMA_NREQUEST_THRESHOLD &&
+		nRequest - nRequestNew > MPIR_PARAM_CH3_RMA_NREQUEST_NEW_THRESHOLD) {
 		int nDone = 0;
                 MPIDI_CH3I_RMAListPartialComplete(win_ptr, ops_list, curr_ptr, &nDone);
 		nRequest -= nDone;
@@ -1939,7 +1939,7 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr)
         mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, dest);
         if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
     }
-    else if (MPIR_PARAM_RMA_LOCK_IMMED && ((assert & MPI_MODE_NOCHECK) == 0)) {
+    else if (MPIR_PARAM_CH3_RMA_LOCK_IMMED && ((assert & MPI_MODE_NOCHECK) == 0)) {
         /* TODO: Make this mode of operation available through an assert
            argument or info key. */
         mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, lock_type, win_ptr);
@@ -2021,7 +2021,7 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
     /* TODO: MPI-3: Add lock_all->op optimization. */
     /* LOCK-OP-UNLOCK Optimization -- This optimization can't be used if we
        have already requested the lock. */
-    if ( MPIR_PARAM_RMA_MERGE_LOCK_OP_UNLOCK &&
+    if ( MPIR_PARAM_CH3_RMA_MERGE_LOCK_OP_UNLOCK &&
          win_ptr->targets[dest].remote_lock_state == MPIDI_CH3_WIN_LOCK_CALLED &&
          rma_op && rma_op->next == NULL /* There is only one op */ &&
          rma_op->type != MPIDI_RMA_COMPARE_AND_SWAP &&
@@ -2655,8 +2655,8 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
 	    nRequest++;
 	    MPIU_INSTR_COUNTER_INCR(winunlock_reqs,1);
 	    curr_ptr    = curr_ptr->next;
-	    if (nRequest > MPIR_PARAM_RMA_NREQUEST_THRESHOLD && 
-		nRequest - nRequestNew > MPIR_PARAM_RMA_NREQUEST_NEW_THRESHOLD) {
+	    if (nRequest > MPIR_PARAM_CH3_RMA_NREQUEST_THRESHOLD &&
+		nRequest - nRequestNew > MPIR_PARAM_CH3_RMA_NREQUEST_NEW_THRESHOLD) {
 		int nDone = 0;
                 MPIDI_CH3I_RMAListPartialComplete(win_ptr,
                                                   &win_ptr->targets[target_rank].rma_ops_list,
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index 0d4afa6..cf511bd 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -1120,7 +1120,7 @@ int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank)
 #ifdef ENABLED_NO_LOCAL
     no_local = 1;
 #else
-    no_local = MPIR_PARAM_NOLOCAL;
+    no_local = MPIR_PARAM_CH3_NOLOCAL;
 #endif
 
     /* Used for debugging on a single machine: Odd procs on a node are
@@ -1129,7 +1129,7 @@ int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank)
 #ifdef ENABLED_ODD_EVEN_CLIQUES
     odd_even_cliques = 1;
 #else
-    odd_even_cliques = MPIR_PARAM_ODD_EVEN_CLIQUES;
+    odd_even_cliques = MPIR_PARAM_CH3_ODD_EVEN_CLIQUES;
 #endif
 
     if (no_local) {
diff --git a/src/mpid/common/sock/iocp/sock.c b/src/mpid/common/sock/iocp/sock.c
index 0098b13..e838d71 100644
--- a/src/mpid/common/sock/iocp/sock.c
+++ b/src/mpid/common/sock/iocp/sock.c
@@ -142,11 +142,11 @@ static int easy_create_ranged(SOCKET *sock, int port, unsigned long addr)
 	return mpi_errno;
     }
     
-    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_PORT_RANGE.low < 0 || MPIR_PARAM_PORT_RANGE.low > MPIR_PARAM_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
-    if (port == 0 && MPIR_PARAM_PORT_RANGE.low != 0 && MPIR_PARAM_PORT_RANGE.high != 0)
+    MPIU_ERR_CHKANDJUMP(MPIR_PARAM_CH3_PORT_RANGE.low < 0 || MPIR_PARAM_CH3_PORT_RANGE.low > MPIR_PARAM_CH3_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
+    if (port == 0 && MPIR_PARAM_CH3_PORT_RANGE.low != 0 && MPIR_PARAM_CH3_PORT_RANGE.high != 0)
     {
 	use_range = 1;
-	port = MPIR_PARAM_PORT_RANGE.low;
+	port = MPIR_PARAM_CH3_PORT_RANGE.low;
     }
 
     memset(&sockAddr,0,sizeof(sockAddr));
@@ -162,7 +162,7 @@ static int easy_create_ranged(SOCKET *sock, int port, unsigned long addr)
 	    if (use_range)
 	    {
 		port++;
-		if (port > MPIR_PARAM_PORT_RANGE.high)
+		if (port > MPIR_PARAM_CH3_PORT_RANGE.high)
 		{
 		    mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDU_SOCK_ERR_FAIL, "**socket", 0);
 		    return mpi_errno;
diff --git a/src/mpid/common/sock/poll/sock_post.i b/src/mpid/common/sock/poll/sock_post.i
index e2d927c..9161ce1 100644
--- a/src/mpid/common/sock/poll/sock_post.i
+++ b/src/mpid/common/sock/poll/sock_post.i
@@ -333,10 +333,10 @@ int MPIDU_Sock_listen(struct MPIDU_Sock_set * sock_set, void * user_ptr,
 	int portnum;
 	/* see if we actually want to find values within a range */
 
-        MPIU_ERR_CHKANDJUMP(MPIR_PARAM_PORT_RANGE.low < 0 || MPIR_PARAM_PORT_RANGE.low > MPIR_PARAM_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
+        MPIU_ERR_CHKANDJUMP(MPIR_PARAM_CH3_PORT_RANGE.low < 0 || MPIR_PARAM_CH3_PORT_RANGE.low > MPIR_PARAM_CH3_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange");
 
         /* default MPICH_PORT_RANGE is {0,0} so bind will use any available port */
-        for (portnum = MPIR_PARAM_PORT_RANGE.low; portnum <= MPIR_PARAM_PORT_RANGE.high; ++portnum) {
+        for (portnum = MPIR_PARAM_CH3_PORT_RANGE.low; portnum <= MPIR_PARAM_CH3_PORT_RANGE.high; ++portnum) {
 	    memset( (void *)&addr, 0, sizeof(addr) );
 	    addr.sin_family      = AF_INET;
 	    addr.sin_addr.s_addr = htonl(INADDR_ANY);
diff --git a/src/pm/hydra/ui/mpich/mpiexec.c b/src/pm/hydra/ui/mpich/mpiexec.c
index e9f01e1..83fbcfa 100644
--- a/src/pm/hydra/ui/mpich/mpiexec.c
+++ b/src/pm/hydra/ui/mpich/mpiexec.c
@@ -311,7 +311,7 @@ int main(int argc, char **argv)
      * range. */
     if (MPL_env2str("MPIEXEC_PORTRANGE", (const char **) &HYD_server_info.port_range) ||
         MPL_env2str("MPIEXEC_PORT_RANGE", (const char **) &HYD_server_info.port_range) ||
-        MPL_env2str("MPICH_PORT_RANGE", (const char **) &HYD_server_info.port_range))
+        MPL_env2str("MPIR_PARAM_CH3_PORT_RANGE", (const char **) &HYD_server_info.port_range))
         HYD_server_info.port_range = HYDU_strdup(HYD_server_info.port_range);
 
     /* Add the stdout/stderr callback handlers */
diff --git a/src/pm/hydra/ui/mpich/utils.c b/src/pm/hydra/ui/mpich/utils.c
index 3c6b48f..65eb3e0 100644
--- a/src/pm/hydra/ui/mpich/utils.c
+++ b/src/pm/hydra/ui/mpich/utils.c
@@ -1553,7 +1553,8 @@ static HYD_status set_default_values(void)
                                 "cannot set iface and force hostname propagation");
         }
 
-        HYDU_append_env_to_list("MPICH_NETWORK_IFACE", HYD_server_info.user_global.iface,
+        HYDU_append_env_to_list("MPIR_PARAM_NEMESIS_TCP_NETWORK_IFACE",
+                                HYD_server_info.user_global.iface,
                                 &HYD_server_info.user_global.global_env.system);
 
         /* Disable hostname propagation */
@@ -1563,7 +1564,7 @@ static HYD_status set_default_values(void)
     /* If hostname propagation is requested (or not set), set the
      * environment variable for doing that */
     if (hostname_propagation || hostname_propagation == -1)
-        HYD_server_info.iface_ip_env_name = HYDU_strdup("MPICH_INTERFACE_HOSTNAME");
+        HYD_server_info.iface_ip_env_name = HYDU_strdup("MPIR_PARAM_CH3_INTERFACE_HOSTNAME");
 
     /* Default universe size if the user did not specify anything is
      * INFINITE */
@@ -1753,7 +1754,7 @@ HYD_status HYD_uii_mpx_get_parameters(char **t_argv)
     /* If the user set the checkpoint prefix, set env var to enable
      * checkpointing on the processes  */
     if (HYD_server_info.user_global.ckpoint_prefix)
-        HYDU_append_env_to_list("MPICH_ENABLE_CKPOINT", "1",
+        HYDU_append_env_to_list("MPIR_PARAM_ENABLE_CKPOINT", "1",
                                 &HYD_server_info.user_global.global_env.system);
 
     /* Preset common environment options for disabling STDIO buffering
diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index adb6e56..93c50e8 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -194,14 +194,14 @@ parameters:
     ##############################################################
     # RMA parameters
     - category    : rma
-      name        : RMA_ACC_IMMED
+      name        : CH3_RMA_ACC_IMMED
       type        : boolean
       default     : true
       description : >-
         Use the immediate accumulate optimization
 
     - category    : rma
-      name        : RMA_NREQUEST_THRESHOLD
+      name        : CH3_RMA_NREQUEST_THRESHOLD
       type        : int
       default     : 4000
       description : >-
@@ -211,7 +211,7 @@ parameters:
         requests or other internal resources
 
     - category    : rma
-      name        : RMA_NREQUEST_NEW_THRESHOLD
+      name        : CH3_RMA_NREQUEST_NEW_THRESHOLD
       type        : int
       default     : 128
       description : >-
@@ -221,7 +221,7 @@ parameters:
         or other internal resources.
 
     - category    : rma
-      name        : RMA_LOCK_IMMED
+      name        : CH3_RMA_LOCK_IMMED
       type        : boolean
       default     : false
       description : >-
@@ -229,7 +229,7 @@ parameters:
         behavior is to defer the lock request until the call to MPI_Win_unlock.
 
     - category    : rma
-      name        : RMA_MERGE_LOCK_OP_UNLOCK
+      name        : CH3_RMA_MERGE_LOCK_OP_UNLOCK
       type        : boolean
       default     : true
       description : >-
@@ -239,9 +239,9 @@ parameters:
     ##############################################################
     # intranode communication parameters
     - category    : intranode
-      name        : NOLOCAL
+      name        : CH3_NOLOCAL
       alt-env     :
-                    - NO_LOCAL
+                    - CH3_NO_LOCAL
       type        : boolean
       default     : false
       description : >-
@@ -250,9 +250,9 @@ parameters:
         memory communication hierarchical collectives.
 
     - category    : intranode
-      name        : ODD_EVEN_CLIQUES
+      name        : CH3_ODD_EVEN_CLIQUES
       alt-env     :
-                    - EVEN_ODD_CLIQUES
+                    - CH3_EVEN_ODD_CLIQUES
       type        : boolean
       default     : false
       description : >-
@@ -261,7 +261,7 @@ parameters:
         a single machine.
 
     - category    : intranode
-      name        : POLLS_BEFORE_YIELD
+      name        : NEMESIS_POLLS_BEFORE_YIELD
       type        : int
       default     : 1000
       description : >-
@@ -318,7 +318,7 @@ parameters:
         wide.  If 0, do not truncate, and if <0 use a sensible default.
 
     - category    : intranode
-      name        : NEM_LMT_DMA_THRESHOLD
+      name        : NEMESIS_LMT_DMA_THRESHOLD
       type        : int
       # 2048*1024 == 2MiB
       default     : 2097152
@@ -335,18 +335,22 @@ parameters:
         should be used for communication.
 
     - category    : nemesis
-      name        : INTERFACE_HOSTNAME
+      name        : CH3_INTERFACE_HOSTNAME
+      alt-env     :
+                    - INTERFACE_HOSTNAME
       type        : string
       defaultliteral : NULL
       description : >-
         If non-NULL, this parameter specifies the IP address that
         other processes should use when connecting to this process.
         This parameter is mutually exclusive with the
-        MPICH_NETWORK_IFACE parameter and it is an error to set them
+        MPIR_PARAM_CH3_NETWORK_IFACE parameter and it is an error to set them
         both.
 
     - category    : nemesis
-      name        : NETWORK_IFACE
+      name        : NEMESIS_TCP_NETWORK_IFACE
+      alt-env     :
+                    - NETWORK_IFACE
       type        : string
       defaultliteral : NULL
       description : >-
@@ -358,7 +362,7 @@ parameters:
         them both.
 
     - category    : nemesis
-      name        : HOST_LOOKUP_RETRIES
+      name        : NEMESIS_TCP_HOST_LOOKUP_RETRIES
       type        : int
       default     : 10
       description : >-
@@ -366,7 +370,7 @@ parameters:
         gethostbyname() function before giving up.
 
     - category    : nemesis
-      name        : SHM_EAGER_MAX_SZ
+      name        : NEMESIS_SHM_EAGER_MAX_SZ
       type        : int
       default     : -1
       description : >-
@@ -376,7 +380,7 @@ parameters:
         an appropriate value.
 
     - category    : nemesis
-      name        : SHM_READY_EAGER_MAX_SZ
+      name        : NEMESIS_SHM_READY_EAGER_MAX_SZ
       type        : int
       default     : -2
       description : >-
@@ -387,13 +391,12 @@ parameters:
         then Nemesis will choose an appropriate value.
 
     - category    : nemesis
-      name        : COMM_OVERRIDES
+      name        : NEMESIS_PORTALS_COMM_OVERRIDES
       type        : boolean
       default     : true
       description : >-
         If set to false, communication override functionality will be
-        disabled for netmods that provide the override feature.  Some
-        netmods may not honor this flag.
+        disabled for netmods that provide the override feature.
         # Note the netmod must implement this functionality by not
         # setting the comm_ops table in any VC.
 
@@ -422,7 +425,7 @@ parameters:
   ##############################################################
     # checkpointing parameters
     - category    : checkpointing
-      name        : ENABLE_CKPOINT
+      name        : NEMESIS_ENABLE_CKPOINT
       type        : boolean
       default     : false
       description : >-
@@ -461,9 +464,10 @@ parameters:
   ############################
     # sockets parameters
     - category    : sockets
-      name        : PORT_RANGE
+      name        : CH3_PORT_RANGE
       alt-env     : 
                     - PORTRANGE
+                    - PORT_RANGE
       type        : range
       default     : "0:0"
       description : >-

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

Summary of changes:
 configure.ac                                       |    8 -
 maint/genparams                                    |   10 +
 src/mpi/coll/allreduce.c                           |   11 +-
 src/mpi/coll/barrier.c                             |    8 +-
 src/mpi/coll/bcast.c                               |   12 +-
 src/mpi/coll/iallreduce.c                          |    5 +-
 src/mpi/coll/ibcast.c                              |    5 +-
 src/mpi/coll/ireduce.c                             |    5 +-
 src/mpi/coll/reduce.c                              |   18 +-
 .../ch3/channels/nemesis/netmod/tcp/tcp_init.c     |   16 +-
 .../channels/nemesis/netmod/wintcp/wintcp_init.c   |    4 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c  |    8 +-
 src/mpid/ch3/src/ch3u_rma_sync.c                   |   18 +-
 src/mpid/ch3/src/mpid_vc.c                         |    4 +-
 src/mpid/common/sock/iocp/sock.c                   |    8 +-
 src/mpid/common/sock/poll/sock_post.i              |    4 +-
 src/mpid/pamid/include/mpidi_datatypes.h           |    2 +-
 src/mpid/pamid/include/mpidi_platform.h            |    7 +-
 src/mpid/pamid/include/mpidpre.h                   |    4 +
 src/mpid/pamid/include/pamix.h                     |    6 +-
 src/mpid/pamid/src/mpid_init.c                     |    2 +-
 src/mpid/pamid/src/mpidi_env.c                     |    8 +
 src/mpid/pamid/src/pamix/pamix.c                   |   13 +-
 src/pm/hydra/ui/mpich/mpiexec.c                    |    2 +-
 src/pm/hydra/ui/mpich/utils.c                      |    7 +-
 src/util/param/params.yml                          |  492 ++++++++++++--------
 26 files changed, 415 insertions(+), 272 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list