+ state_ = SIMIX_RUNNING;
+ /* set surf's synchro */
+ if (not MC_is_active() && not MC_record_replay_is_active()) {
+ surf_action_ = surf_host_model->execute_parallel(hosts, flops_amounts.data(), bytes_amounts.data(), -1);
+ if (surf_action_ != nullptr) {
+ surf_action_->set_data(this);
+ }
+ }
+ XBT_DEBUG("Create parallel execute synchro %p", this);
+ ExecImpl::on_creation(*this);
+ return this;
+}
+void ExecImpl::cancel()
+{
+ XBT_VERB("This exec %p is canceled", this);
+ if (surf_action_ != nullptr)
+ surf_action_->cancel();
+}
+
+double ExecImpl::get_remaining() const
+{
+ return surf_action_ ? surf_action_->get_remains() : 0;
+}
+
+double ExecImpl::get_seq_remaining_ratio()
+{
+ return (surf_action_ == nullptr) ? 0 : surf_action_->get_remains() / surf_action_->get_cost();
+}
+
+double ExecImpl::get_par_remaining_ratio()
+{
+ // parallel task: their remain is already between 0 and 1
+ return (surf_action_ == nullptr) ? 0 : surf_action_->get_remains();
+}
+
+void ExecImpl::set_bound(double bound)
+{
+ if (surf_action_)
+ surf_action_->set_bound(bound);
+}
+void ExecImpl::set_priority(double priority)
+{
+ if (surf_action_)
+ surf_action_->set_priority(priority);