+ExecPtr Exec::set_hosts(const std::vector<Host*>& hosts)
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the hosts of an exec once it's done (state: %d)", (int)state_);
+ hosts_ = hosts;
+ parallel_ = true;
+ return this;
+}
+
+///////////// SEQUENTIAL EXECUTIONS ////////
+Exec* Exec::start()
+{
+ if (is_parallel())
+ kernel::actor::simcall([this] {
+ (*boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_))
+ .set_hosts(hosts_)
+ .set_timeout(timeout_)
+ .set_flops_amounts(flops_amounts_)
+ .set_bytes_amounts(bytes_amounts_)
+ .start();
+ });
+ else
+ kernel::actor::simcall([this] {
+ (*boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_))
+ .set_name(get_name())
+ .set_tracing_category(get_tracing_category())
+ .set_sharing_penalty(1. / priority_)
+ .set_bound(bound_)
+ .set_flops_amount(flops_amounts_.front())
+ .start();
+ });
+ state_ = State::STARTED;
+ on_start(*Actor::self(), *this);
+ return this;
+}
+
+double Exec::get_remaining() const