Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename option smpi/privatize-global-variables to smpi/privatization
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 20 Apr 2017 10:27:48 +0000 (12:27 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 20 Apr 2017 10:27:48 +0000 (12:27 +0200)
doc/doxygen/options.doc
src/simgrid/sg_config.cpp
src/simix/smx_global.cpp
src/smpi/smpi_global.cpp
src/smpi/smpirun.in
teshsuite/smpi/mpich3-test/runtests
tools/cmake/Tests.cmake

index 08c69d2..b508671 100644 (file)
@@ -895,11 +895,11 @@ of counters, the "default" set.
 --cfg=smpi/papi-events:"default:PAPI_L3_LDM:PAPI_L2_LDM"
 \endverbatim
 
 --cfg=smpi/papi-events:"default:PAPI_L3_LDM:PAPI_L2_LDM"
 \endverbatim
 
-\subsection options_smpi_global smpi/privatize-global-variables: Automatic privatization of global variables
+\subsection options_smpi_global smpi/privatization: Automatic privatization of global variables
 
 
-MPI executables are meant to be executed in separated processes, but SMPI is
+MPI executables are usually meant to be executed in separated processes, but SMPI is
 executed in only one process. Global variables from executables will be placed
 executed in only one process. Global variables from executables will be placed
-in the same memory zone and shared between processes, causing hard to find bugs.
+in the same memory zone and shared between processes, causing intricate bugs.
 Several options are possible to avoid this, as described in the main
 <a href="https://hal.inria.fr/hal-01415484">SMPI publication</a>.
 SimGrid provides two ways of automatically privatizing the globals,
 Several options are possible to avoid this, as described in the main
 <a href="https://hal.inria.fr/hal-01415484">SMPI publication</a>.
 SimGrid provides two ways of automatically privatizing the globals,
index 5f7437a..ede4743 100644 (file)
@@ -503,10 +503,11 @@ void sg_config_init(int *argc, char **argv)
     if (default_privatization == nullptr)
       default_privatization = "no";
 
     if (default_privatization == nullptr)
       default_privatization = "no";
 
-    xbt_cfg_register_string("smpi/privatize-global-variables", default_privatization, nullptr,
+    xbt_cfg_register_string("smpi/privatization", default_privatization, nullptr,
                             "How we should privatize global variable at runtime (no, yes, mmap, dlopen).");
 
                             "How we should privatize global variable at runtime (no, yes, mmap, dlopen).");
 
-    xbt_cfg_register_alias("smpi/privatize-global-variables", "smpi/privatize_global_variables");
+    xbt_cfg_register_alias("smpi/privatization", "smpi/privatize-global-variables");
+    xbt_cfg_register_alias("smpi/privatization", "smpi/privatize_global_variables");
 
     xbt_cfg_register_boolean("smpi/grow-injected-times", "yes", nullptr, "Whether we want to make the injected time in MPI_Iprobe and MPI_Test grow, to allow faster simulation. This can make simulation less precise, though.");
 
 
     xbt_cfg_register_boolean("smpi/grow-injected-times", "yes", nullptr, "Whether we want to make the injected time in MPI_Iprobe and MPI_Test grow, to allow faster simulation. This can make simulation less precise, though.");
 
index 341c3e3..e34130d 100644 (file)
@@ -96,9 +96,9 @@ static void segvhandler(int signum, siginfo_t *siginfo, void *context)
 #if HAVE_SMPI
     if (smpi_enabled() && smpi_privatize_global_variables == SMPI_PRIVATIZE_NONE) {
 #if HAVE_PRIVATIZATION
 #if HAVE_SMPI
     if (smpi_enabled() && smpi_privatize_global_variables == SMPI_PRIVATIZE_NONE) {
 #if HAVE_PRIVATIZATION
-      fprintf(stderr, "Try to enable SMPI variable privatization with --cfg=smpi/privatize-global-variables:yes.\n");
+      fprintf(stderr, "Try to enable SMPI variable privatization with --cfg=smpi/privatization:yes.\n");
 #else
 #else
-      fprintf(stderr, "Sadly, your system does not support --cfg=smpi/privatize-global-variables:yes (yet).\n");
+      fprintf(stderr, "Sadly, your system does not support --cfg=smpi/privatization:yes (yet).\n");
 #endif /* HAVE_PRIVATIZATION */
     }
 #endif /* HAVE_SMPI */
 #endif /* HAVE_PRIVATIZATION */
     }
 #endif /* HAVE_SMPI */
index 6234227..cf5d342 100644 (file)
@@ -446,7 +446,7 @@ static void smpi_init_options(){
     simgrid::smpi::Colls::smpi_coll_cleanup_callback=nullptr;
     smpi_cpu_threshold = xbt_cfg_get_double("smpi/cpu-threshold");
     smpi_host_speed = xbt_cfg_get_double("smpi/host-speed");
     simgrid::smpi::Colls::smpi_coll_cleanup_callback=nullptr;
     smpi_cpu_threshold = xbt_cfg_get_double("smpi/cpu-threshold");
     smpi_host_speed = xbt_cfg_get_double("smpi/host-speed");
-    const char* smpi_privatize_option = xbt_cfg_get_string("smpi/privatize-global-variables");
+    const char* smpi_privatize_option               = xbt_cfg_get_string("smpi/privatization");
     if (std::strcmp(smpi_privatize_option, "no") == 0)
       smpi_privatize_global_variables = SMPI_PRIVATIZE_NONE;
     else if (std::strcmp(smpi_privatize_option, "yes") == 0)
     if (std::strcmp(smpi_privatize_option, "no") == 0)
       smpi_privatize_global_variables = SMPI_PRIVATIZE_NONE;
     else if (std::strcmp(smpi_privatize_option, "yes") == 0)
@@ -463,8 +463,7 @@ static void smpi_init_options(){
       smpi_privatize_global_variables = SMPI_PRIVATIZE_NONE;
 
     else
       smpi_privatize_global_variables = SMPI_PRIVATIZE_NONE;
 
     else
-      xbt_die("Invalid value for smpi/privatize-global-variables: %s",
-        smpi_privatize_option);
+      xbt_die("Invalid value for smpi/privatization: %s", smpi_privatize_option);
 
     if (smpi_cpu_threshold < 0)
       smpi_cpu_threshold = DBL_MAX;
 
     if (smpi_cpu_threshold < 0)
       smpi_cpu_threshold = DBL_MAX;
index b6a7ec5..7c83e0f 100755 (executable)
@@ -23,7 +23,7 @@ NETWORK_BANDWIDTH="${DEFAULT_NETWORK_BANDWIDTH}"
 NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}"
 SPEED="${DEFAULT_SPEED}"
 
 NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}"
 SPEED="${DEFAULT_SPEED}"
 
-PRIVATIZE="--cfg=smpi/privatize-global-variables:@HAVE_PRIVATIZATION@"
+PRIVATIZE="--cfg=smpi/privatization:@HAVE_PRIVATIZATION@"
 
 SIMOPTS="--cfg=surf/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP-gamma:4194304"
 
 
 SIMOPTS="--cfg=surf/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP-gamma:4194304"
 
index 1e7ce7c..4bd97a2 100755 (executable)
@@ -422,7 +422,7 @@ sub RunList {
        # skip empty lines
        if ($programname eq "") { next; }
 
        # skip empty lines
        if ($programname eq "") { next; }
 
-       #if privatization is disabled, and if the test needs it, ignore it
+       # if privatization is disabled, and if the test needs it, ignore it
        if ($needs_privatization == 1 &&
                $enabled_privatization != 1) {
                 SkippedTest($programname, $np, $workdir, "requires SMPI privatization");
        if ($needs_privatization == 1 &&
                $enabled_privatization != 1) {
                 SkippedTest($programname, $np, $workdir, "requires SMPI privatization");
index 07e97ce..f207bfc 100644 (file)
@@ -73,9 +73,9 @@ IF(HAVE_MC)
 ENDIF()
 
 IF(enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN AND HAVE_THREAD_CONTEXTS)
 ENDIF()
 
 IF(enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN AND HAVE_THREAD_CONTEXTS)
-  ADD_TEST(test-smpi-mpich3-thread-f77     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f77/ ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests ${TESH_OPTION} -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/ -tests=testlist -privatization=${HAVE_PRIVATIZATION} -execarg=--cfg=contexts/stack_size:8000 -execarg=--cfg=contexts/factory:thread -execarg=--cfg=smpi/privatize-global-variables:${HAVE_PRIVATIZATION})
+  ADD_TEST(test-smpi-mpich3-thread-f77     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f77/ ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests ${TESH_OPTION} -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/ -tests=testlist -privatization=${HAVE_PRIVATIZATION} -execarg=--cfg=contexts/stack_size:8000 -execarg=--cfg=contexts/factory:thread -execarg=--cfg=smpi/privatization:${HAVE_PRIVATIZATION})
   SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f77 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
   SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f77 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
-  ADD_TEST(test-smpi-mpich3-thread-f90     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f90/ ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests ${TESH_OPTION} -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/ -tests=testlist -privatization=${HAVE_PRIVATIZATION} -execarg=--cfg=smpi/privatize-global-variables:${HAVE_PRIVATIZATION} -execarg=--cfg=contexts/factory:thread)
+  ADD_TEST(test-smpi-mpich3-thread-f90     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f90/ ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests ${TESH_OPTION} -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/ -tests=testlist -privatization=${HAVE_PRIVATIZATION} -execarg=--cfg=smpi/privatization:${HAVE_PRIVATIZATION} -execarg=--cfg=contexts/factory:thread)
   SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f90 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
 ENDIF()
 
   SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f90 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
 ENDIF()