X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/62dcd7bdc99162b0675bbc9100a36b53ebe65f29..b23ab258ec14e70d63c28d53c379cd7ccc8a5809:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 2006197702..1fb5d32668 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -55,7 +55,7 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host) xbt_assert(! sg_host_by_name(host->id), "Refusing to create a second host named '%s'.", host->id); - simgrid::surf::RoutingEdge *net = NULL; + simgrid::surf::NetCard *net = NULL; simgrid::surf::As* current_routing = routing_get_current(); if (current_routing) net = routing_add_host(current_routing, host); @@ -68,9 +68,11 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host) host->speed_scale, host->speed_trace, host->core_amount, - host->initial_state, + host->initiallyOn, host->state_trace); surf_host_model->createHost(host->id, net, cpu, host->properties)->attach(h); + simgrid::Host::onCreation(*h); + if (TRACE_is_enabled() && TRACE_needs_platform()) sg_instr_new_host(host); } @@ -88,7 +90,7 @@ void sg_platf_new_router(sg_platf_router_cbarg_t router) "Reading a router, processing unit \"%s\" already exists", router->id); - simgrid::surf::RoutingEdge *info = new simgrid::surf::RoutingEdgeImpl( + simgrid::surf::NetCard *info = new simgrid::surf::NetCardImpl( xbt_strdup(router->id), -1, SURF_NETWORK_ELEMENT_ROUTER, current_routing); info->setId(current_routing->parsePU(info)); xbt_lib_set(as_router_lib, router->id, ROUTING_ASR_LEVEL, (void *) info);