Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Yet another dlopen merge
[simgrid.git] / src / simgrid / sg_config.cpp
index dd0df36..a5eba59 100644 (file)
@@ -499,7 +499,12 @@ void sg_config_init(int *argc, char **argv)
     xbt_cfg_register_alias("smpi/send-is-detached-thresh","smpi/send_is_detached_thresh");
     xbt_cfg_register_alias("smpi/send-is-detached-thresh","smpi/send_is_detached_thres");
 
-    xbt_cfg_register_boolean("smpi/privatize-global-variables", "no", nullptr, "Whether we should privatize global variable at runtime.");
+    const char* default_privatization = std::getenv("SMPI_PRIVATIZATION");
+    if (default_privatization == nullptr)
+      default_privatization = "no";
+
+    xbt_cfg_register_string("smpi/privatize-global-variables", default_privatization, nullptr, "Whether 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_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.");