1: pre-inited (cfg_set created);
2: inited (running) */
-/* callback of the workstation_model variable */
+/* callback of the workstation/model variable */
static void _surf_cfg_cb__workstation_model(const char *name, int pos)
{
char *val;
find_model_description(surf_workstation_model_description, val);
}
-/* callback of the cpu_model variable */
+/* callback of the cpu/model variable */
static void _surf_cfg_cb__cpu_model(const char *name, int pos)
{
char *val;
surf_cpu_model_description[i].name);
default_value = xbt_strdup("Cas01");
xbt_cfg_register(&_surf_cfg_set,
- "cpu_model", description, xbt_cfgelm_string,
+ "cpu/model", description, xbt_cfgelm_string,
&default_value, 1, 1, &_surf_cfg_cb__cpu_model, NULL);
sprintf(description,
surf_network_model_description[i].name);
default_value = xbt_strdup("LV08");
xbt_cfg_register(&_surf_cfg_set,
- "network_model", description, xbt_cfgelm_string,
+ "network/model", description, xbt_cfgelm_string,
&default_value, 1, 1, &_surf_cfg_cb__network_model,
NULL);
surf_workstation_model_description[i].name);
default_value = xbt_strdup("CLM03");
xbt_cfg_register(&_surf_cfg_set,
- "workstation_model", description, xbt_cfgelm_string,
+ "workstation/model", description, xbt_cfgelm_string,
&default_value, 1, 1, &_surf_cfg_cb__workstation_model,
NULL);
surf_timer_model_init(platform_file);
workstation_model_name =
- xbt_cfg_get_string(_surf_cfg_set, "workstation_model");
- char *network_model_name = xbt_cfg_get_string(_surf_cfg_set, "network_model");
- char *cpu_model_name = xbt_cfg_get_string(_surf_cfg_set, "cpu_model");
+ xbt_cfg_get_string(_surf_cfg_set, "workstation/model");
+ char *network_model_name = xbt_cfg_get_string(_surf_cfg_set, "network/model");
+ char *cpu_model_name = xbt_cfg_get_string(_surf_cfg_set, "cpu/model");
if ((strcmp(network_model_name,"LV08") || strcmp(cpu_model_name,"Cas01"))
&& !strcmp(workstation_model_name, "CLM03")){
const char *val = "compound";
INFO0("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);
+ xbt_cfg_set_string(_surf_cfg_set,"workstation/model",val);
workstation_model_name = (char*)"compound";
}
void surf_config_models_create_elms(void)
{
char *workstation_model_name =
- xbt_cfg_get_string(_surf_cfg_set, "workstation_model");
+ xbt_cfg_get_string(_surf_cfg_set, "workstation/model");
int workstation_id =
find_model_description(surf_workstation_model_description,
workstation_model_name);