[mvapich-commit] r3753 - in mvapich2/trunk/src/mpid/ch3/channels/mrail/src: gen2 rdma udapl

perkinjo at mvapich.cse.ohio-state.edu perkinjo at mvapich.cse.ohio-state.edu
Mon Feb 22 19:34:03 EST 2010


Author: perkinjo
Date: 2010-02-22 19:34:03 -0500 (Mon, 22 Feb 2010)
New Revision: 3753

Modified:
   mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c
   mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.h
   mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c
   mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.c
   mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.h
Log:
[kandalla]
Finalizing the cpu-mapping patch as discussed. The following is the summary of
the code-path : 

* compiled WITH hwloc
  - user defined mapping
    * This is used whenever the user sets MV2_CPU_MAPPING.

  - hwloc defined mapping
    * This is used if MV2_USE_HWLOC_CPU_BINDING != 0 and
    * unset(MV2_CPU_MAPPING).

  - osu defined mapping
    * This is used if MV2_USE_HWLOC_CPU_BINDING == 0 is and
    * unset(MV2_CPU_MAPPING).

  - linear mapping
    * This is used as a fallback if unset(MV2_CPU_MAPPING) and hwloc/osu
    * cannot provide a mapping.

  - no mapping
    * This is used if MV2_ENABLE_AFFINITY == 0

* compiled WITHOUT hwloc
  - user defined mapping
    * This is used whenever the user sets MV2_CPU_MAPPING.

  - osu defined mapping
    * This is used if unset(MV2_CPU_MAPPING).

  - linear mapping
    * This is used as a fallback if unset(MV2_CPU_MAPPING) and osu
    * cannot provide a mapping.

  - no mapping
    * This is used if MV2_ENABLE_AFFINITY == 0

Changes have been applied to both gen2 and udapl. 






Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c
===================================================================
--- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c	2010-02-23 00:33:43 UTC (rev 3752)
+++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.c	2010-02-23 00:34:03 UTC (rev 3753)
@@ -169,7 +169,6 @@
 
 
 /* Optimal CPU Binding parameters */
-int use_efficient_cpu_binding = 1;
 #ifdef HAVE_LIBHWLOC
 int use_hwloc_cpu_binding=1;
 #else 
@@ -1273,10 +1272,6 @@
     rdma_rq_size = rdma_prepost_depth + 
         rdma_prepost_rendezvous_extra + rdma_prepost_noop_extra;
     
-    if ((value = getenv("MV2_USE_EFFICIENT_CPU_BINDING")) != NULL) {
-        use_efficient_cpu_binding = atoi(value);
-    }
-    
     if ((value = getenv("MV2_USE_HWLOC_CPU_BINDING")) != NULL) {
         use_hwloc_cpu_binding = atoi(value);
     }

Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.h
===================================================================
--- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.h	2010-02-23 00:33:43 UTC (rev 3752)
+++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/gen2/ibv_param.h	2010-02-23 00:34:03 UTC (rev 3753)
@@ -104,7 +104,6 @@
 extern int                  rdma_iwarp_use_multiple_cq;
 
 extern int                  num_cpus;
-extern int                  use_efficient_cpu_binding;
 extern int                  use_hwloc_cpu_binding; 
 
 #define PKEY_MASK 0x7fff /* the last bit is reserved */

Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c
===================================================================
--- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c	2010-02-23 00:33:43 UTC (rev 3752)
+++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/rdma/ch3_smp_progress.c	2010-02-23 00:34:03 UTC (rev 3753)
@@ -76,7 +76,6 @@
 int AMD_BARCELONA_MAPPING[]        = {0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3};
 
 extern int num_cpus;
-extern int use_efficient_cpu_binding;
 extern int use_hwloc_cpu_binding;
 unsigned int viadev_enable_affinity = 1;
 #endif /* defined(USE_PROCESSOR_AFFINITY) */
@@ -3237,20 +3236,17 @@
             /* Call the cpu_mapping function to find out about how the
              * processors are numbered on the different sockets. 
              */
-            if(use_efficient_cpu_binding == 1) { 
 #if defined(HAVE_LIBHWLOC)
-                if(use_hwloc_cpu_binding == 1) { 
-                    mpi_errno = get_cpu_mapping_hwloc(N_CPUs_online);
-                 } else { 
+            if(use_hwloc_cpu_binding == 1) { 
+                 mpi_errno = get_cpu_mapping_hwloc(N_CPUs_online);
+             } else { 
 #endif
                  mpi_errno = get_cpu_mapping(N_CPUs_online);
 #if defined(HAVE_LIBHWLOC)
-                 }
+             }
 #endif
-            }
-            
-            if(mpi_errno != MPI_SUCCESS || use_efficient_cpu_binding == 0 
-                   || arch_type == 0) { 
+             
+            if(mpi_errno != MPI_SUCCESS || arch_type == 0 || custom_cpu_mapping == NULL) { 
                 /* For some reason, we were not able to retrieve the cpu mapping
                 * information. We are falling back on the linear mapping. 
                 * This may not deliver the best performace 

Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.c
===================================================================
--- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.c	2010-02-23 00:33:43 UTC (rev 3752)
+++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.c	2010-02-23 00:34:03 UTC (rev 3753)
@@ -117,7 +117,6 @@
 unsigned long rdma_dreg_cache_limit = 0;
 
 /* Optimal CPU Binding parameters */
-int use_efficient_cpu_binding = 1;
 #ifdef HAVE_LIBHWLOC
 int use_hwloc_cpu_binding=1;
 #else
@@ -310,9 +309,6 @@
             knomial_2level_bcast_system_size_threshold=(int)atoi(value);
      }
 
-    if ((value = getenv("MV2_USE_EFFICIENT_CPU_BINDING")) != NULL) {
-        use_efficient_cpu_binding = atoi(value);
-    }
     if ((value = getenv("MV2_USE_HWLOC_CPU_BINDING")) != NULL) {
         use_hwloc_cpu_binding = atoi(value);
     }

Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.h
===================================================================
--- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.h	2010-02-23 00:33:43 UTC (rev 3752)
+++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/udapl/udapl_param.h	2010-02-23 00:34:03 UTC (rev 3753)
@@ -58,7 +58,6 @@
 extern long rdma_eagersize_1sc;
 
 extern int  num_cpus;
-extern int  use_efficient_cpu_binding;
 extern int  use_hwloc_cpu_binding;
 
 



More information about the mvapich-commit mailing list