X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/20cdb3d92942b4596c5e49a6ef65d21274ab48ca..57970de8f4fd548711e2cea76502ba692595fa4a:/src/simgrid/sg_config.cpp diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index e30c0fc95c..6de9f2fcd9 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -45,7 +45,8 @@ int _sg_cfg_exit_asap = 0; static void sg_config_cmd_line(int *argc, char **argv) { int shall_exit = 0; - int i, j; + int i; + int j; for (j = i = 1; i < *argc; i++) { if (!strncmp(argv[i], "--cfg=", strlen("--cfg="))) { @@ -208,7 +209,7 @@ static void _sg_cfg_cb_model_check_replay(const char *name) { MC_record_path = nullptr; } -#if HAVE_MC +#if SIMGRID_HAVE_MC extern int _sg_do_model_check_record; static void _sg_cfg_cb_model_check_record(const char *name) { _sg_do_model_check_record = xbt_cfg_get_boolean(name); @@ -375,7 +376,7 @@ void sg_config_init(int *argc, char **argv) xbt_cfg_register_string("model-check/replay", nullptr, _sg_cfg_cb_model_check_replay, "Model-check path to replay (as reported by SimGrid when a violation is reported)"); -#if HAVE_MC +#if SIMGRID_HAVE_MC /* do model-checking-record */ xbt_cfg_register_boolean("model-check/record", "no", _sg_cfg_cb_model_check_record, "Record the model-checking paths"); @@ -472,6 +473,8 @@ void sg_config_init(int *argc, char **argv) xbt_cfg_register_alias("smpi/host-speed","smpi/running_power"); xbt_cfg_register_alias("smpi/host-speed","smpi/running-power"); + xbt_cfg_register_boolean("smpi/keep-temps", "no", nullptr, "Whether we should keep the generated temporary files."); + xbt_cfg_register_boolean("smpi/display-timing", "no", nullptr, "Whether we should display the timing after simulation."); xbt_cfg_register_alias("smpi/display-timing", "smpi/display_timing"); @@ -482,6 +485,9 @@ void sg_config_init(int *argc, char **argv) "Whether SMPI_SHARED_MALLOC is enabled. Disable it for debugging purposes."); xbt_cfg_register_alias("smpi/shared-malloc", "smpi/use-shared-malloc"); xbt_cfg_register_alias("smpi/shared-malloc", "smpi/use_shared_malloc"); + xbt_cfg_register_double("smpi/shared-malloc-blocksize", 1UL << 20, nullptr, "Size of the bogus file which will be created for global shared allocations"); + xbt_cfg_register_string("smpi/shared-malloc-hugepage", "", nullptr, + "Path to a mounted hugetlbfs, to use huge pages with shared malloc."); xbt_cfg_register_double("smpi/cpu-threshold", 1e-6, nullptr, "Minimal computation time (in seconds) not discarded, or -1 for infinity."); xbt_cfg_register_alias("smpi/cpu-threshold", "smpi/cpu_threshold"); @@ -498,8 +504,15 @@ void sg_config_init(int *argc, char **argv) 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", nullptr, "Whether we should privatize global variable at runtime."); - xbt_cfg_register_alias("smpi/privatize-global-variables", "smpi/privatize_global_variables"); + const char* default_privatization = std::getenv("SMPI_PRIVATIZATION"); + if (default_privatization == nullptr) + default_privatization = "no"; + + xbt_cfg_register_string("smpi/privatization", default_privatization, nullptr, + "How we should privatize global variable at runtime (no, yes, mmap, dlopen)."); + + xbt_cfg_register_alias("smpi/privatization", "smpi/privatize-global-variables"); + xbt_cfg_register_alias("smpi/privatization", "smpi/privatize_global_variables"); xbt_cfg_register_boolean("smpi/grow-injected-times", "yes", nullptr, "Whether we want to make the injected time in MPI_Iprobe and MPI_Test grow, to allow faster simulation. This can make simulation less precise, though.");