Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify how cpus are plugged into hosts at creation
[simgrid.git] / src / surf / sg_platf.cpp
index b189642..208484b 100644 (file)
@@ -62,7 +62,7 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host)
 
   sg_host_t h = simgrid::Host::by_name_or_create(host->id);
   simgrid::surf::Cpu *cpu = surf_cpu_model_pm->createCpu(
-        host->id,
+               h,
         host->speed_peak,
         host->pstate,
         host->speed_scale,
@@ -70,7 +70,6 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host)
         host->core_amount,
         host->initial_state,
         host->state_trace);
-  cpu->plug(h);
   surf_host_model->createHost(host->id, net, cpu, host->properties)->attach(h);
   if (TRACE_is_enabled() && TRACE_needs_platform())
     sg_instr_new_host(host);