- simix_config_init(); /* make sure that our configuration set is created */
- surf_timer_model_init(file);
-
- /* which model do you want today? */
- workstation_model_name =
- xbt_cfg_get_string(_simix_cfg_set, "workstation_model");
-
- DEBUG1("Model : %s", workstation_model_name);
- workstation_id =
- find_model_description(surf_workstation_model_description,
- surf_workstation_model_description_size,
- workstation_model_name);
- if (!strcmp(workstation_model_name, "compound")) {
- xbt_ex_t e;
- char *network_model_name = NULL;
- char *cpu_model_name = NULL;
- int network_id = -1;
- int cpu_id = -1;
-
- TRY {
- cpu_model_name = xbt_cfg_get_string(_simix_cfg_set, "cpu_model");
- } CATCH(e) {
- if (e.category == bound_error) {
- xbt_assert0(0,
- "Set a cpu model to use with the 'compound' workstation model");
- xbt_ex_free(e);
- } else {
- RETHROW;
- }
- }
-
- TRY {
- network_model_name =
- xbt_cfg_get_string(_simix_cfg_set, "network_model");
- }
- CATCH(e) {
- if (e.category == bound_error) {
- xbt_assert0(0,
- "Set a network model to use with the 'compound' workstation model");
- xbt_ex_free(e);
- } else {
- RETHROW;
- }
- }
-
- network_id =
- find_model_description(surf_network_model_description,
- surf_network_model_description_size,
- network_model_name);
- cpu_id =
- find_model_description(surf_cpu_model_description,
- surf_cpu_model_description_size,
- cpu_model_name);