X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/58a6e74bc2e1f188543734ef1778169823c090c3..db90e1631e8edef2c777129b97bb4707990cc911:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index fe17a3cd88..867b0d29c4 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -331,7 +331,8 @@ void sg_platf_new_cabinet(const simgrid::kernel::routing::CabinetCreationArgs* c simgrid::kernel::resource::DiskImpl* sg_platf_new_disk(const simgrid::kernel::routing::DiskCreationArgs* disk) { - simgrid::kernel::resource::DiskImpl* pimpl = surf_disk_model->create_disk(disk->id, disk->read_bw, disk->write_bw); + simgrid::kernel::resource::DiskImpl* pimpl = + routing_get_current()->create_disk(disk->id, disk->read_bw, disk->write_bw)->get_impl(); if (disk->properties) { pimpl->set_properties(*disk->properties); @@ -515,8 +516,9 @@ simgrid::kernel::routing::NetZoneImpl* sg_platf_new_Zone_begin(const simgrid::ke simgrid::kernel::routing::NetZoneImpl* new_zone = nullptr; simgrid::kernel::resource::NetworkModel* netmodel = current_routing == nullptr ? static_cast( - models_by_type[simgrid::kernel::resource::Model::Type::NETWORK][0]) - : current_routing->network_model_; + simgrid::kernel::EngineImpl::get_instance()->get_default_model( + simgrid::kernel::resource::Model::Type::NETWORK)) + : current_routing->get_network_model(); if (strcasecmp(zone->routing.c_str(), "Cluster") == 0) { new_zone = new simgrid::kernel::routing::ClusterZone(current_routing, zone->id, netmodel);