X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ec86e827d8bb67988913e0658155b2fa4fbd7ac6..54a25f9e51c5aa862e5306c508234188fd295247:/src/surf/surf_config.c diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index 5227d675f2..dd4c08c88c 100644 --- a/src/surf/surf_config.c +++ b/src/surf/surf_config.c @@ -204,6 +204,11 @@ static void _surf_cfg_cb_contexts_nthreads(const char *name, int pos) SIMIX_context_set_nthreads(xbt_cfg_get_int(_surf_cfg_set, name)); } +static void _surf_cfg_cb_contexts_parallel_threshold(const char *name, int pos) +{ + SIMIX_context_set_parallel_threshold(xbt_cfg_get_int(_surf_cfg_set, name)); +} + static void _surf_cfg_cb__surf_network_fullduplex(const char *name, int pos) { @@ -365,6 +370,13 @@ void surf_config_init(int *argc, char **argv) xbt_cfgelm_int, &default_value_int, 1, 1, _surf_cfg_cb_contexts_nthreads, NULL); + /* minimal number of user contexts to be run in parallel */ + default_value_int = 1; + xbt_cfg_register(&_surf_cfg_set, "contexts/parallel_threshold", + "Minimal number of user contexts to be run in parallel", + xbt_cfgelm_int, &default_value_int, 1, 1, + _surf_cfg_cb_contexts_parallel_threshold, NULL); + default_value_int = 0; xbt_cfg_register(&_surf_cfg_set, "fullduplex", "Activate the interferences between uploads and downloads for fluid max-min models (LV08, CM03)",