Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move hosts_ to ActivityImpl_ to allow tracking of detached comms by maestro
[simgrid.git] / src / surf / HostImpl.cpp
index 5e7d0da..4f39fab 100644 (file)
@@ -95,12 +95,11 @@ void HostImpl::turn_off(const actor::ActorImpl* issuer)
     issuer->kill(&actor);
   }
   for (const auto& activity : EngineImpl::get_instance()->get_maestro()->activities_) {
-    auto* exec = dynamic_cast<activity::ExecImpl*>(activity.get());
-    if (exec != nullptr) {
-      auto hosts = exec->get_hosts();
+    if (activity != nullptr) {
+      auto hosts = activity->get_hosts();
       if (std::find(hosts.begin(), hosts.end(), &piface_) != hosts.end()) {
-        exec->cancel();
-        exec->set_state(activity::State::FAILED);
+        activity->cancel();
+        activity->set_state(activity::State::FAILED);
       }
     }
   }