X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e26d84ebd86c18af7d79d4afd659e53fd62ac9eb..43f5aa483faaf237121a30a49e59ce74e42e1acc:/src/simgrid/sg_config.c diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index 585bd3b38e..6bfc5c7da3 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -461,14 +461,16 @@ static void _sg_cfg_cb_contexts_parallel_mode(const char *name, int pos) static void _sg_cfg_cb__surf_network_coordinates(const char *name, int pos) { + static int already_set = 0; int val = xbt_cfg_get_boolean(_sg_cfg_set, name); if (val) { - if (!COORD_HOST_LEVEL) { + if (!already_set) { COORD_HOST_LEVEL = xbt_lib_add_level(host_lib,xbt_dynar_free_voidp); COORD_ASR_LEVEL = xbt_lib_add_level(as_router_lib,xbt_dynar_free_voidp); } + already_set = 1; } else - if (COORD_HOST_LEVEL) + if (already_set) xbt_die("Setting of whether to use coordinate cannot be disabled once set."); } @@ -1024,7 +1026,6 @@ void surf_config_models_setup() if ((!xbt_cfg_is_default_value(_sg_cfg_set, "network/model") || !xbt_cfg_is_default_value(_sg_cfg_set, "cpu/model")) && xbt_cfg_is_default_value(_sg_cfg_set, "host/model")) { - XBT_INFO("Switching host model to compound since you changed the network and/or cpu model(s)"); host_model_name = "compound"; xbt_cfg_set_string(_sg_cfg_set, "host/model", host_model_name); }