Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix default value for contexts/nthreads (only the help message is affected).
[simgrid.git] / src / surf / surf_config.c
index 0954084..617bffc 100644 (file)
@@ -247,7 +247,7 @@ static void _surf_cfg_cb_contexts_parallel_mode(const char *name, int pos)
     SIMIX_context_set_parallel_mode(XBT_PARMAP_BUSY_WAIT);
   }
   else {
-    XBT_WARN("Command line setting of the parallel synchronization mode should "
+    xbt_die("Command line setting of the parallel synchronization mode should "
         "be one of \"posix\", \"futex\" or \"busy_wait\"");
   }
 }
@@ -486,7 +486,7 @@ void surf_config_init(int *argc, char **argv)
         _surf_cfg_cb_contexts_parallel_mode, NULL);
 
     /* number of parallel threads for Surf */
-    default_value_int = 1;
+    default_value_int = surf_get_nthreads();
     xbt_cfg_register(&_surf_cfg_set, "surf/nthreads",
                      "Number of parallel threads used to update Surf models",
                      xbt_cfgelm_int, &default_value_int, 1, 1,