X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4596d90b0c0f0453e4e24c67f3e28fc2bb0f8287..3400fc8e74d6ccf632346df99770baf940a1bedc:/src/surf/surf_config.c diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index 0fff09fabb..f7d686ec9a 100644 --- a/src/surf/surf_config.c +++ b/src/surf/surf_config.c @@ -460,14 +460,16 @@ void surf_config_models_setup(const char *platform_file) * we should switch to the "compound" workstation model to correctly dispatch stuff to * the right net/cpu models. */ - if ((strcmp(network_model_name, "LV08") - || strcmp(cpu_model_name, "Cas01")) - && !strcmp(workstation_model_name, "CLM03")) { - const char *val = "compound"; - XBT_INFO - ("Switching workstation model to compound since you changed the network and/or cpu model(s)"); - xbt_cfg_set_string(_surf_cfg_set, "workstation/model", val); - workstation_model_name = (char *) "compound"; + + if((!xbt_cfg_is_default_value(_surf_cfg_set, "network/model") || + !xbt_cfg_is_default_value(_surf_cfg_set, "cpu/model")) && + xbt_cfg_is_default_value(_surf_cfg_set, "workstation/model")) + { + const char *val = "compound"; + XBT_INFO + ("Switching workstation model to compound since you changed the network and/or cpu model(s)"); + xbt_cfg_set_string(_surf_cfg_set, "workstation/model", val); + workstation_model_name = (char *) "compound"; } XBT_DEBUG("Workstation model: %s", workstation_model_name);