Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
(crudly) deal with I/O launched by maestro
[simgrid.git] / src / kernel / EngineImpl.cpp
index 547a532..15fb9f4 100644 (file)
@@ -422,6 +422,10 @@ void EngineImpl::wake_all_waiting_actors() const
         if (exec != nullptr && exec->get_actor() == maestro_)
           exec->get_iface()->complete(s4u::Activity::State::FAILED);
 
+        auto* io = dynamic_cast<activity::IoImpl*>(action->get_activity());
+        if (io != nullptr && io->get_actor() == maestro_)
+          io->get_iface()->complete(s4u::Activity::State::FAILED);
+
         activity::ActivityImplPtr(action->get_activity())->post();
       }
     }
@@ -435,8 +439,13 @@ void EngineImpl::wake_all_waiting_actors() const
         // started it). SimDAG I see you!
         // TODO: do the same for other activity kinds once comms are cleaned up
         auto* exec = dynamic_cast<activity::ExecImpl*>(action->get_activity());
-        if (exec != nullptr && exec->get_actor() == maestro_)
+        if (exec != nullptr && exec->get_actor() == maestro_) {
+          exec->set_finish_time(action->get_finish_time());
           exec->get_iface()->complete(s4u::Activity::State::FINISHED);
+        }
+        auto* io = dynamic_cast<activity::IoImpl*>(action->get_activity());
+        if (io != nullptr && io->get_actor() == maestro_)
+          io->get_iface()->complete(s4u::Activity::State::FINISHED);
 
         activity::ActivityImplPtr(action->get_activity())->post();
       }