X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/908f43d575e3b19014f39ba209da997ab6e3fa2c..d2548eab32dea3d8939f0d71332c3e8ee2748445:/src/simgrid/sg_config.c diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index d600f19af7..fe33f2b56e 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -279,6 +279,12 @@ static void _sg_cfg_cb__coll_reduce(const char *name, int pos) static void _sg_cfg_cb__coll_reduce_scatter(const char *name, int pos){ _sg_cfg_cb__coll("reduce_scatter", mpi_coll_reduce_scatter_description, name, pos); } +static void _sg_cfg_cb__coll_scatter(const char *name, int pos){ + _sg_cfg_cb__coll("scatter", mpi_coll_scatter_description, name, pos); +} +static void _sg_cfg_cb__coll_barrier(const char *name, int pos){ + _sg_cfg_cb__coll("barrier", mpi_coll_barrier_description, name, pos); +} #endif /* callback of the inclusion path */ @@ -312,6 +318,13 @@ static void _sg_cfg_cb_verbose_exit(const char *name, int pos) _sg_do_verbose_exit = xbt_cfg_get_boolean(_sg_cfg_set, name); } +extern int _sg_do_clean_atexit; + +static void _sg_cfg_cb_clean_atexit(const char *name, int pos) +{ + _sg_do_clean_atexit = xbt_cfg_get_boolean(_sg_cfg_set, name); +} + static void _sg_cfg_cb_context_factory(const char *name, int pos) { smx_context_factory_name = xbt_cfg_get_string(_sg_cfg_set, name); @@ -702,6 +715,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.", @@ -775,11 +795,21 @@ void sg_config_init(int *argc, char **argv) xbt_cfgelm_string, NULL, 1, 1, &_sg_cfg_cb__coll_allgather, NULL); + xbt_cfg_register(&_sg_cfg_set, "smpi/barrier", + "Which collective to use for barrier", + xbt_cfgelm_string, NULL, 1, 1, &_sg_cfg_cb__coll_barrier, + NULL); + xbt_cfg_register(&_sg_cfg_set, "smpi/reduce_scatter", "Which collective to use for reduce_scatter", xbt_cfgelm_string, NULL, 1, 1, &_sg_cfg_cb__coll_reduce_scatter, NULL); + xbt_cfg_register(&_sg_cfg_set, "smpi/scatter", + "Which collective to use for scatter", + xbt_cfgelm_string, NULL, 1, 1, &_sg_cfg_cb__coll_scatter, + NULL); + xbt_cfg_register(&_sg_cfg_set, "smpi/allgatherv", "Which collective to use for allgatherv", xbt_cfgelm_string, NULL, 1, 1, &_sg_cfg_cb__coll_allgatherv, @@ -811,6 +841,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, + _sg_cfg_cb_clean_atexit, 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();