void Exec::start()
{
- pimpl_ = simcall_execution_start(nullptr, flops_amount_, 1 / priority_, 0.);
+ pimpl_ = simcall_execution_start(nullptr, flops_amount_, 1 / priority_, 0., host_);
state_ = started;
}
this->start();
}
+ if (simcall_execution_test(pimpl_)) {
+ state_ = finished;
+ return true;
+ }
+
return false;
}
ExecPtr Exec::setPriority(double priority)
{
+ xbt_assert(state_ == inited, "Cannot change the priority of an exec after its start");
priority_ = priority;
return this;
}
+ExecPtr Exec::setHost(Host* host)
+{
+ xbt_assert(state_ == inited, "Cannot change the host of an exec after its start");
+ host_ = host;
+ return this;
+}
double Exec::getRemains()
{