X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/149c63f36e15b8500b1e826bda5138318ff7ba2b..9cdf0f51bf67ecb8df0ece7c12283c705f1531d7:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 43a1913307..01cbb713f7 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -116,6 +116,13 @@ simgrid::kernel::routing::NetPoint* sg_platf_new_router(const std::string& name, static void sg_platf_new_link(const simgrid::kernel::routing::LinkCreationArgs* link, const std::string& link_name) { + static double last_warned_latency = sg_surf_precision; + if (link->latency != 0.0 && link->latency < last_warned_latency) { + XBT_WARN("Latency for link %s is smaller than surf/precision (%g < %g)." + " For more accuracy, consider setting \"--cfg=surf/precision:%g\".", + link_name.c_str(), link->latency, sg_surf_precision, link->latency); + last_warned_latency = link->latency; + } simgrid::kernel::resource::LinkImpl* l = surf_network_model->create_link(link_name, link->bandwidths, link->latency, link->policy); @@ -444,7 +451,8 @@ void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor) } xbt_die("%s", msg.c_str()); } - const simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(actor->function); + const simgrid::kernel::actor::ActorCodeFactory& factory = + simgrid::kernel::EngineImpl::get_instance()->get_function(actor->function); xbt_assert(factory, "Error while creating an actor from the XML file: Function '%s' not registered", actor->function); double start_time = actor->start_time; @@ -452,7 +460,7 @@ void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor) bool auto_restart = actor->restart_on_failure; std::string actor_name = actor->args[0]; - simgrid::simix::ActorCode code = factory(std::move(actor->args)); + simgrid::kernel::actor::ActorCode code = factory(std::move(actor->args)); std::shared_ptr> properties(actor->properties); simgrid::kernel::actor::ProcessArg* arg =