From 635743ad3b947c1b55642cb708fbf1626fe0b36f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 6 Jul 2017 00:23:23 +0200 Subject: [PATCH] don't fail on sg_host_energy_update_all() in presence of VMs (fix #192) --- src/surf/plugins/host_energy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index 85d3d0c49d..2b88fb032c 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -468,7 +468,8 @@ void sg_host_energy_update_all() std::vector list; simgrid::s4u::Engine::instance()->hostList(&list); for (auto host : list) - host->extension()->update(); + if (dynamic_cast(host) == nullptr) // Ignore virtual machines + host->extension()->update(); }); } -- 2.20.1