X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/412030f2d029818ada64567bd92cbc3d0ec0d634..62be96c324e33952038493a0aef1bb4a518766c3:/src/surf/workstation_ptask_L07.c diff --git a/src/surf/workstation_ptask_L07.c b/src/surf/workstation_ptask_L07.c index 1a21049e2f..2e7fa61dea 100644 --- a/src/surf/workstation_ptask_L07.c +++ b/src/surf/workstation_ptask_L07.c @@ -684,6 +684,8 @@ static cpu_L07_t cpu_new(const char *name, double power_scale, xbt_dict_t cpu_properties) { cpu_L07_t cpu = xbt_new0(s_cpu_L07_t, 1); + xbt_assert1(! xbt_dict_get_or_null(workstation_set, name), + "Host '%s' declared several times in the platform file.",name); cpu->model = (surf_model_t) surf_workstation_model; cpu->type = SURF_WORKSTATION_RESOURCE_CPU; @@ -752,18 +754,19 @@ static void link_free(void *nw_link) } static link_L07_t link_new(char *name, - double bw_initial, - tmgr_trace_t bw_trace, - double lat_initial, - tmgr_trace_t lat_trace, - e_surf_link_state_t - state_initial, - tmgr_trace_t state_trace, - e_surf_link_sharing_policy_t - policy, xbt_dict_t properties) -{ + double bw_initial, + tmgr_trace_t bw_trace, + double lat_initial, + tmgr_trace_t lat_trace, + e_surf_link_state_t + state_initial, + tmgr_trace_t state_trace, + e_surf_link_sharing_policy_t + policy, xbt_dict_t properties) +{ link_L07_t nw_link = xbt_new0(s_link_L07_t, 1); - + xbt_assert1(! xbt_dict_get_or_null(link_set, name), + "Link '%s' declared several times in the platform file.",name); nw_link->model = (surf_model_t) surf_workstation_model; nw_link->type = SURF_WORKSTATION_RESOURCE_LINK;