X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/11932d0967b5a5bc7a5c0e8a0b34778dc4c5c0cd..a5c102f3397e8112b97c27981bfdbcaac76d79f6:/src/kernel/activity/ExecImpl.cpp diff --git a/src/kernel/activity/ExecImpl.cpp b/src/kernel/activity/ExecImpl.cpp index fedef0824d..844847a705 100644 --- a/src/kernel/activity/ExecImpl.cpp +++ b/src/kernel/activity/ExecImpl.cpp @@ -51,14 +51,6 @@ namespace simgrid { namespace kernel { namespace activity { -ExecImpl::ExecImpl(const std::string& name, const std::string& tracing_category) : ActivityImpl(name) -{ - this->state_ = SIMIX_RUNNING; - this->set_category(tracing_category); - - XBT_DEBUG("Create exec %p", this); -} - ExecImpl::~ExecImpl() { if (timeout_detector_) @@ -72,6 +64,18 @@ ExecImpl* ExecImpl::set_host(s4u::Host* host) return this; } +ExecImpl* ExecImpl::set_name(const std::string& name) +{ + ActivityImpl::set_name(name); + return this; +} + +ExecImpl* ExecImpl::set_tracing_category(const std::string& category) +{ + ActivityImpl::set_category(category); + return this; +} + ExecImpl* ExecImpl::set_timeout(double timeout) { if (timeout > 0 && not MC_is_active() && not MC_record_replay_is_active()) { @@ -83,6 +87,7 @@ ExecImpl* ExecImpl::set_timeout(double timeout) ExecImpl* ExecImpl::start(double flops_amount, double priority, double bound) { + state_ = SIMIX_RUNNING; if (not MC_is_active() && not MC_record_replay_is_active()) { surf_action_ = host_->pimpl_cpu->execution_start(flops_amount); surf_action_->set_data(this); @@ -99,6 +104,7 @@ ExecImpl* ExecImpl::start(double flops_amount, double priority, double bound) ExecImpl* ExecImpl::start(const std::vector& hosts, const std::vector& flops_amounts, const std::vector& bytes_amounts) { + 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);