X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1e56742544f7195c4cc0525569d610b0ba0e3d8c..a7740c25f68f21ce361c63ab639a7fe3cd18042b:/src/surf/cpu.c diff --git a/src/surf/cpu.c b/src/surf/cpu.c index 06bcaac948..75b84d589b 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -13,7 +13,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf, surf_cpu_model_t surf_cpu_model = NULL; lmm_system_t cpu_maxmin_system = NULL; -xbt_dict_t cpu_set; +xbt_dict_t cpu_set = NULL; static void cpu_free(void *cpu) { @@ -29,7 +29,9 @@ static cpu_Cas01_t cpu_new(char *name, double power_scale, xbt_dict_t cpu_properties) { cpu_Cas01_t cpu = xbt_new0(s_cpu_Cas01_t, 1); - + xbt_assert1(!xbt_dict_get_or_null(cpu_set, name), + "Host '%s' declared several times in the platform file",name); + cpu->model = (surf_model_t) surf_cpu_model; cpu->name = name; cpu->power_scale = power_scale;