X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4502ea93a773951ce03aec68f7e16586bd28d8ac..f7d854f7d841d5ddd0375eeeaafcdf4d51616a9a:/src/surf/workstation.c diff --git a/src/surf/workstation.c b/src/surf/workstation.c index 7d5a655d05..2827aaf122 100644 --- a/src/surf/workstation.c +++ b/src/surf/workstation.c @@ -9,7 +9,6 @@ #include "xbt/dict.h" #include "portable.h" #include "surf_private.h" -#include "network_common.h" typedef struct workstation_CLM03 { s_surf_resource_t generic_resource; /* Must remain first to add this to a trace */ @@ -45,10 +44,11 @@ void create_workstations(void) void *cpu = NULL; xbt_dict_foreach(surf_model_resource_set(surf_cpu_model), cursor, name, cpu) { - int *id = xbt_dict_get_or_null(used_routing->host_id,name); - xbt_assert1(id, "No host %s found in the platform file", name); + int *id = NULL; + if (used_routing && used_routing->host_id) + xbt_dict_get_or_null(used_routing->host_id,name); - workstation_new(name, cpu, *id); + workstation_new(name, cpu, id?*id:0); } }