--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
-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,
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).");
- 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.");
#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
- 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 */
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)
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;
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"
# 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");
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!")
- 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()