surf_cpu_model_pm = java_cpu_model;
xbt_dynar_push(model_list, &java_cpu_model);
xbt_dynar_push(model_list_invoke, &java_cpu_model);
- sg_platf_host_add_cb(parse_cpu_init);
+ sg_platf_host_add_cb(cpu_parse_init);
}
void setCpuModel(CpuModel *cpuModel){
}
void setCpu(char *name, Cpu *cpu) {
- xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, cpu);
+ sg_host_surfcpu_set(sg_host_by_name(name), cpu);
}
NetworkLinkDynar getRoute(char *srcName, char *dstName) {
RoutingEdge *src = (RoutingEdge*)xbt_lib_get_or_null(host_lib, srcName, ROUTING_HOST_LEVEL);
RoutingEdge *dst = (RoutingEdge*)xbt_lib_get_or_null(host_lib, dstName, ROUTING_HOST_LEVEL);
- if (src==NULL)
- xbt_die("TOTO");
- if (dst==NULL)
- xbt_die("TOTO");
+ xbt_assert(src,"Cannot get the route from a NULL source");
+ xbt_assert(dst,"Cannot get the route to a NULL destination");
xbt_dynar_t route = xbt_dynar_new(sizeof(RoutingEdgePtr), NULL);
routing_platf->getRouteAndLatency(src, dst, &route, NULL);
return route;