X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12ab9f6d3d340747aae64b0e75eded8268c6fed2..125ba3dea38f9b31330b322f9bc59fdd428821ae:/src/surf/surf_config.c diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index 5227d675f2..e98f304966 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 = 20; + 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)",