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.");
}
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);
}