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,
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);