X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50242809cc408d0c30337fde31c91e36860b3b60..bb40307f3fde0e2802daaa98c9a6ea2739f290d4:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index df1622759d..820a60e2d1 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -137,10 +137,12 @@ void sg_platf_exit(void) { void sg_platf_new_host(sg_platf_host_cbarg_t host) { + RoutingEdge *net = NULL; As* current_routing = routing_get_current(); if (current_routing) - routing_add_host(current_routing, host); - surf_cpu_model_pm->createCpu( + net = routing_add_host(current_routing, host); + + Cpu *cpu = surf_cpu_model_pm->createCpu( host->id, host->power_peak, host->pstate, @@ -150,7 +152,7 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host) host->initial_state, host->state_trace, host->properties); - surf_host_model->createHost(host->id); + surf_host_model->createHost(host->id, net, cpu); unsigned int iterator; sg_platf_host_cb_t fun;