Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move some content from AsNone into As (AsNone should die)
[simgrid.git] / src / surf / sg_platf.cpp
index a178aa7..09f9f45 100644 (file)
@@ -60,7 +60,7 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host)
   if (current_routing)
     net = routing_add_host(current_routing, host);
 
-  sg_host_t h = simgrid::Host::by_name_or_create(host->id);
+  sg_host_t h = simgrid::s4u::Host::by_name_or_create(host->id);
   simgrid::surf::Cpu *cpu = surf_cpu_model_pm->createCpu(
                h,
         host->speed_peak,
@@ -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::s4u::Host::onCreation(*h);
+
   if (TRACE_is_enabled() && TRACE_needs_platform())
     sg_instr_new_host(host);
 }