X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/83f54f6317f4a731d5534216d9ffb51b69dd51c9..6cb7d1fc585d47d6dbad8c288e8f275448f8025c:/src/surf/cpu_cas01.cpp diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 25635b0e10..6d8ca3cc7c 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -53,7 +53,7 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel() xbt_die("Unsupported optimization (%s) for this model", optim.c_str()); } - maxminSystem_ = new simgrid::kernel::lmm::s_lmm_system_t(selectiveUpdate_); + maxminSystem_ = new simgrid::kernel::lmm::System(selectiveUpdate_); if (getUpdateMechanism() == UM_LAZY) { modifiedSet_ = new ActionLmmList(); @@ -63,10 +63,6 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel() CpuCas01Model::~CpuCas01Model() { - delete maxminSystem_; - maxminSystem_ = nullptr; - delete modifiedSet_; - surf_cpu_model_pm = nullptr; } @@ -160,10 +156,11 @@ void CpuCas01::apply_event(tmgr_trace_event_t event, double value) } /** @brief Start a new execution on this CPU lasting @param size flops and using one core */ -CpuAction *CpuCas01::execution_start(double size) +CpuAction* CpuCas01::execution_start(double size) { return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint()); } + CpuAction* CpuCas01::execution_start(double size, int requestedCores) { return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint(), requestedCores); @@ -177,9 +174,9 @@ CpuAction *CpuCas01::sleep(double duration) XBT_IN("(%s,%g)", getCname(), duration); CpuCas01Action* action = new CpuCas01Action(model(), 1.0, isOff(), speed_.scale * speed_.peak, constraint()); - // FIXME: sleep variables should not consume 1.0 in lmm_expand + // FIXME: sleep variables should not consume 1.0 in System::expand() action->setMaxDuration(duration); - action->suspended_ = 2; + action->suspended_ = Action::SuspendStates::sleeping; if (duration < 0) { // NO_MAX_DURATION /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */ simgrid::xbt::intrusive_erase(*action->getStateSet(), *action);