Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / simgrid / sg_config.c
index 3022b610d48aa7bb7d949ee01b5105fdd916a9d5..f66e1bf2e7a846d397f02c7c0ed0f3aa9fbbd6a4 100644 (file)
@@ -708,6 +708,13 @@ void sg_config_init(int *argc, char **argv)
                      NULL);
     xbt_cfg_setdefault_boolean(_sg_cfg_set, "smpi/display_timing", default_value);
 
+    default_value = xbt_strdup("yes");
+    xbt_cfg_register(&_sg_cfg_set, "smpi/use_shared_malloc",
+                     "Boolean indicating whether we should use shared memory when using SMPI_SHARED_MALLOC. Allows user to disable it for debug purposes.",
+                     xbt_cfgelm_boolean, &default_value, 1, 1, NULL,
+                     NULL);
+    xbt_cfg_setdefault_boolean(_sg_cfg_set, "smpi/use_shared_malloc", default_value);
+    
     double default_threshold = 1e-6;
     xbt_cfg_register(&_sg_cfg_set, "smpi/cpu_threshold",
                      "Minimal computation time (in seconds) not discarded.",
@@ -827,6 +834,13 @@ void sg_config_init(int *argc, char **argv)
                     NULL);
 #endif // HAVE_SMPI
 
+    default_value = xbt_strdup("yes");
+    xbt_cfg_register(&_sg_cfg_set, "clean_atexit",
+                     "\"yes\" or \"no\". \"yes\" enables all the cleanups of SimGrid (XBT,SIMIX,MSG) to be registered with atexit. \"no\" may be useful if your code segfaults when calling the exit function.",
+                     xbt_cfgelm_boolean, &default_value, 1, 1,
+                     NULL, NULL);
+    xbt_cfg_setdefault_boolean(_sg_cfg_set, "clean_atexit", default_value);
+
     if (!surf_path) {
       /* retrieves the current directory of the        current process */
       const char *initial_path = __surf_get_initial_path();