Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename the S4U interface stored in internal objects as piface
[simgrid.git] / src / surf / plugins / energy.cpp
index 57ad84b..c333364 100644 (file)
@@ -5,7 +5,6 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <utility>
-#include <vector>
 
 #include "simgrid/plugins/energy.h"
 #include "simgrid/simix.hpp"
@@ -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<simgrid::surf::HostImpl>();
 
-    HostEnergy *host_energy = host->p_host->extension<HostEnergy>();
+    HostEnergy *host_energy = host->piface->extension<HostEnergy>();
 
     if(host_energy->last_updated < surf_get_clock())
       host_energy->update();