From: Martin Quinson Date: Wed, 5 Jul 2017 22:23:23 +0000 (+0200) Subject: don't fail on sg_host_energy_update_all() in presence of VMs (fix #192) X-Git-Tag: v3_17~456 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/635743ad3b947c1b55642cb708fbf1626fe0b36f don't fail on sg_host_energy_update_all() in presence of VMs (fix #192) --- 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(); }); }