Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / simgrid / sg_config.cpp
index 312d7eb..f90dfa9 100644 (file)
@@ -115,7 +115,7 @@ static void _sg_cfg_cb__plugin(const char *name)
   xbt_assert(_sg_cfg_init_status < 2, "Cannot load a plugin after the initialization");
 
   char *val = xbt_cfg_get_string(name);
-  if (val==nullptr)
+  if (val==nullptr || val[0] == '\0')
     return;
 
   if (!strcmp(val, "help")) {
@@ -335,6 +335,8 @@ static void _sg_cfg_cb__surf_path(const char *name)
 
 static void _sg_cfg_cb_model_check_replay(const char *name) {
   MC_record_path = xbt_cfg_get_string(name);
+  if (MC_record_path[0] == '\0')
+    MC_record_path = nullptr;
 }
 
 #if HAVE_MC
@@ -356,11 +358,6 @@ static void _sg_cfg_cb_clean_atexit(const char *name)
   _sg_do_clean_atexit = xbt_cfg_get_boolean(name);
 }
 
-static void _sg_cfg_cb_context_factory(const char *name)
-{
-  smx_context_factory_name = xbt_cfg_get_string(name);
-}
-
 static void _sg_cfg_cb_context_stack_size(const char *name)
 {
   smx_context_stack_size_was_set = 1;
@@ -546,23 +543,6 @@ void sg_config_init(int *argc, char **argv)
 
     xbt_cfg_register_boolean("verbose-exit", "yes", _sg_cfg_cb_verbose_exit, "Activate the \"do nothing\" mode in Ctrl-C");
 
-    /* context factory */
-    const char *dflt_ctx_fact = "thread";
-    {
-      char *p = description +
-        sprintf(description, "Context factory to use in SIMIX. Possible values: %s", dflt_ctx_fact);
-#if HAVE_UCONTEXT_CONTEXTS
-      dflt_ctx_fact = "ucontext";
-      p += sprintf(p, ", %s", dflt_ctx_fact);
-#endif
-#if HAVE_RAW_CONTEXTS
-      dflt_ctx_fact = "raw";
-      p += sprintf(p, ", %s", dflt_ctx_fact);
-#endif
-      sprintf(p, ".");
-    }
-    xbt_cfg_register_string("contexts/factory", dflt_ctx_fact, _sg_cfg_cb_context_factory, description);
-
     xbt_cfg_register_int("contexts/stack-size", 8*1024, _sg_cfg_cb_context_stack_size, "Stack size of contexts in KiB");
     /* (FIXME: this is unpleasant) Reset this static variable that was altered when setting the default value. */
     smx_context_stack_size_was_set = 0;
@@ -637,11 +617,13 @@ void sg_config_init(int *argc, char **argv)
 
     xbt_cfg_register_int("smpi/async-small-thresh", 0, NULL,
         "Maximal size of messages that are to be sent asynchronously, without waiting for the receiver");
+    xbt_cfg_register_alias("smpi/async-small-thresh","smpi/async_small_thresh");
     xbt_cfg_register_alias("smpi/async-small-thresh","smpi/async_small_thres");
 
     xbt_cfg_register_int("smpi/send-is-detached-thresh", 65536, NULL,
         "Threshold of message size where MPI_Send stops behaving like MPI_Isend and becomes MPI_Ssend");
     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", NULL, "Whether we should privatize global variable at runtime.");
     xbt_cfg_register_alias("smpi/privatize-global-variables", "smpi/privatize_global_variables");