Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Support for bounded actions in BMF solver
[simgrid.git] / src / plugins / host_energy.cpp
index b01fc31772dc7c7589beb15e978e17ba73a5a797..ef191bfd51f32206a6b56d4568a46028e136818d 100644 (file)
@@ -110,7 +110,7 @@ before you can get accurate energy predictions.
   @endrst
  */
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_energy, surf, "Logging specific to the SURF energy plugin");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_energy, kernel, "Logging specific to the host energy plugin");
 
 // Forwards declaration needed to make this function a friend (because friends have external linkage by default)
 static void on_simulation_end();
@@ -333,7 +333,7 @@ double HostEnergy::get_current_watts_value(double cpu_load) const
 double HostEnergy::get_consumed_energy()
 {
   if (last_updated_ < simgrid::s4u::Engine::get_clock()) // We need to simcall this as it modifies the environment
-    simgrid::kernel::actor::simcall(std::bind(&HostEnergy::update, this));
+    simgrid::kernel::actor::simcall_answered(std::bind(&HostEnergy::update, this));
 
   return total_energy_;
 }
@@ -509,7 +509,7 @@ void sg_host_energy_plugin_init()
  */
 void sg_host_energy_update_all()
 {
-  simgrid::kernel::actor::simcall([]() {
+  simgrid::kernel::actor::simcall_answered([]() {
     std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
     for (auto const& host : list)
       if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host) == nullptr) { // Ignore virtual machines