- xbt_assert(host_ != nullptr, "Calling remains() on a parallel execution is not allowed. "
- "We would need to return a vector instead of a scalar. "
- "Did you meant remainingRatio() instead?");
+ set_state(State::RUNNING);
+ if (not MC_is_active() && not MC_record_replay_is_active()) {
+ if (get_hosts().size() == 1) {
+ if (thread_count_ == 1) {
+ model_action_ = get_host()->get_cpu()->execution_start(flops_amounts_.front(), bound_);
+ model_action_->set_sharing_penalty(sharing_penalty_);
+ } else {
+ auto host_model = get_host()->get_netpoint()->get_englobing_zone()->get_host_model();
+ model_action_ = host_model->execute_thread(get_host(), flops_amounts_.front(), thread_count_);
+ }
+ model_action_->set_category(get_tracing_category());
+ } else {
+ // get the model from first host since we have only 1 by now
+ auto host_model = get_host()->get_netpoint()->get_englobing_zone()->get_host_model();
+ model_action_ = host_model->execute_parallel(get_hosts(), flops_amounts_.data(), bytes_amounts_.data(), -1);
+ }
+ model_action_->set_activity(this);
+ set_start_time(model_action_->get_start_time());
+ }