@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();
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_;
}
*/
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