- surf_action_ = host_->pimpl_cpu->execution_start(flops_amount);
- surf_action_->set_data(this);
- surf_action_->set_priority(priority);
- if (bound > 0)
- surf_action_->set_bound(bound);
+ 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_);
+ } 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());