X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7c047878cb2905079a6a0544f1a15134ae3ab3a6..c84dc84beaec1cdcf7a49f1247cbc390414feaa0:/src/surf/plugins/energy.cpp diff --git a/src/surf/plugins/energy.cpp b/src/surf/plugins/energy.cpp index 76e254de84..c333364b4f 100644 --- a/src/surf/plugins/energy.cpp +++ b/src/surf/plugins/energy.cpp @@ -5,7 +5,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include #include "simgrid/plugins/energy.h" #include "simgrid/simix.hpp" @@ -156,7 +155,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::kernel(std::bind(&HostEnergy::update, this)); + simgrid::simix::kernelImmediate(std::bind(&HostEnergy::update, this)); return total_energy; } @@ -220,7 +219,7 @@ static void onActionStateChange(simgrid::surf::CpuAction *action, simgrid::surf: if (vm) // If it's a VM, take the corresponding PM host = vm->getPm()->extension(); - HostEnergy *host_energy = host->p_host->extension(); + HostEnergy *host_energy = host->piface->extension(); if(host_energy->last_updated < surf_get_clock()) host_energy->update();