Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
need to set Exec finish time when created by maestro
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Thu, 16 Dec 2021 23:57:50 +0000 (00:57 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Thu, 16 Dec 2021 23:57:50 +0000 (00:57 +0100)
src/kernel/EngineImpl.cpp
src/kernel/activity/ExecImpl.hpp

index 547a532..c674144 100644 (file)
@@ -435,9 +435,10 @@ 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);
-
+        }
         activity::ActivityImplPtr(action->get_activity())->post();
       }
     }
index 3022827..a7e5f57 100644 (file)
@@ -42,6 +42,7 @@ public:
   void set_cb_id(unsigned int cb_id) { cb_id_ = cb_id; }
 
   double get_start_time() const { return start_time_; }
+  void set_finish_time(double finish_time) { finish_time_ = finish_time; }
   double get_finish_time() const { return finish_time_; }
 
   ExecImpl& set_flops_amount(double flop_amount);