Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't clear flops_amount on ExecImpl::reset.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 5 Mar 2023 14:32:32 +0000 (15:32 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 5 Mar 2023 14:39:59 +0000 (15:39 +0100)
Fix failures where flops_amount is not defined anymore in ExecImpl::start
(found by building with CXXFLAGS=-D_GLIBCXX_DEBUG)

src/kernel/activity/ExecImpl.cpp

index 83e3b28..a05e00c 100644 (file)
@@ -71,6 +71,7 @@ ExecImpl* ExecImpl::start()
   set_state(State::RUNNING);
   if (not MC_is_active() && not MC_record_replay_is_active()) {
     if (get_hosts().size() == 1) {
+      xbt_assert(not flops_amounts_.empty(), "Cannot start Exec: no flops_amount defined.");
       if (thread_count_ == 1) {
         model_action_ = get_host()->get_cpu()->execution_start(flops_amounts_.front(), bound_);
         model_action_->set_sharing_penalty(sharing_penalty_);
@@ -202,8 +203,6 @@ void ExecImpl::finish()
 void ExecImpl::reset()
 {
   clear_hosts();
-  bytes_amounts_.clear();
-  flops_amounts_.clear();
   set_start_time(-1.0);
 }