X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/262c0777ed16cb8e15eaadd3785c6fec87039b26..4052b6d9960bd9792127d006c4f359b946cb7baa:/src/surf/plugins/host_energy.cpp diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index b35157c4a4..a90c80e9e0 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -45,7 +45,7 @@ AllCores is 200 Watts. This is enough to compute the consumption as a function of the amount of loaded cores: - + @@ -307,7 +307,7 @@ double HostEnergy::getCurrentWattsValue(double cpu_load) double HostEnergy::getConsumedEnergy() { if (last_updated < surf_get_clock()) // We need to simcall this as it modifies the environment - simgrid::simix::kernelImmediate(std::bind(&HostEnergy::update, this)); + simgrid::simix::simcall(std::bind(&HostEnergy::update, this)); return total_energy; } @@ -461,7 +461,7 @@ void sg_host_energy_plugin_init() simgrid::s4u::Host::onStateChange.connect(&onHostChange); simgrid::s4u::Host::onSpeedChange.connect(&onHostChange); simgrid::s4u::Host::onDestruction.connect(&onHostDestruction); - simgrid::s4u::onSimulationEnd.connect(&onSimulationEnd); + simgrid::s4u::on_simulation_end.connect(&onSimulationEnd); simgrid::surf::CpuAction::onStateChange.connect(&onActionStateChange); } @@ -473,7 +473,7 @@ void sg_host_energy_plugin_init() */ void sg_host_energy_update_all() { - simgrid::simix::kernelImmediate([]() { + simgrid::simix::simcall([]() { std::vector list = simgrid::s4u::Engine::get_instance()->get_all_hosts(); for (auto const& host : list) if (dynamic_cast(host) == nullptr) // Ignore virtual machines
#Cores loadedConsumptionExplanation
\#Cores loadedConsumptionExplanation
0 100 WattsIdle value
1 120 WattsOneCore value
2 147 Wattslinear extrapolation between OneCore and AllCores