X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2613dece7ac1a22cb1edbed4e2803fc0a3e7db67..85313e62aa3ec8a2f1de00cb7da9df46588ea2c2:/src/plugins/host_load.cpp diff --git a/src/plugins/host_load.cpp b/src/plugins/host_load.cpp index 2ea7c479f8..9eb3d96861 100644 --- a/src/plugins/host_load.cpp +++ b/src/plugins/host_load.cpp @@ -124,7 +124,7 @@ void HostLoad::update() while (iter != end(current_activities)) { auto& activity = iter->first; // Just an alias auto& remaining_cost_after_last_update = iter->second; // Just an alias - auto& action = activity->surf_action_; + auto& action = activity->model_action_; auto current_iter = iter; ++iter; @@ -247,12 +247,9 @@ void sg_host_load_plugin_init() XBT_WARN("HostLoad plugin currently does not support executions on several hosts"); } }); - simgrid::s4u::Activity::on_completion_cb([](simgrid::s4u::Activity const& activity) { - const auto* exec = dynamic_cast(&activity); - if (exec == nullptr) // Only Execs are concerned here - return; - if (exec->get_host_number() == 1) { // We only run on one host - simgrid::s4u::Host* host = exec->get_host(); + simgrid::s4u::Exec::on_completion_cb([](simgrid::s4u::Exec const& exec) { + if (exec.get_host_number() == 1) { // We only run on one host + simgrid::s4u::Host* host = exec.get_host(); if (const auto* vm = dynamic_cast(host)) host = vm->get_pm(); xbt_assert(host != nullptr);