if (current_routing)
net = routing_add_host(current_routing, host);
+ sg_host_t h = simgrid::Host::by_name_or_create(host->id);
simgrid::surf::Cpu *cpu = surf_cpu_model_pm->createCpu(
host->id,
host->speed_peak,
host->initial_state,
host->state_trace,
host->properties);
- sg_host_surfcpu_register(sg_host_by_name(host->id), cpu);
+ cpu->plug(h);
surf_host_model->createHost(host->id, net, cpu);
if (TRACE_is_enabled() && TRACE_needs_platform())