X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4c98af3dcf6ab83a095d195accad6943379ab220..22eeafc5748e8cb949138bd8323750d6e171d6b3:/src/surf/plugins/host_energy.cpp
diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp
index 0b3ca1d3b5..e8f4fa4cb1 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:
-#Cores loaded | Consumption | Explanation |
+\#Cores loaded | Consumption | Explanation |
0 | 100 Watts | Idle value |
1 | 120 Watts | OneCore value |
2 | 147 Watts | linear extrapolation between OneCore and AllCores |
@@ -424,7 +424,7 @@ static void onHostDestruction(simgrid::s4u::Host& host)
static void onSimulationEnd()
{
- std::vector hosts = simgrid::s4u::Engine::getInstance()->getAllHosts();
+ std::vector hosts = simgrid::s4u::Engine::get_instance()->get_all_hosts();
double total_energy = 0.0; // Total energy consumption (whole platform)
double used_hosts_energy = 0.0; // Energy consumed by hosts that computed something
@@ -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);
}
@@ -474,7 +474,7 @@ void sg_host_energy_plugin_init()
void sg_host_energy_update_all()
{
simgrid::simix::kernelImmediate([]() {
- std::vector list = simgrid::s4u::Engine::getInstance()->getAllHosts();
+ std::vector list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
for (auto const& host : list)
if (dynamic_cast(host) == nullptr) // Ignore virtual machines
host->extension()->update();