X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/863d7ae03c294566165effc8a6eff7fed7cb3e9f..80a26f28c70233093bcb877e7a3e38b5cdca6091:/src/surf/surf_interface.cpp diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index f61c84fb41..02dfd42156 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -8,6 +8,7 @@ #include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.h" #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals +#include "src/kernel/lmm/maxmin.hpp" // Constraint #include "src/kernel/routing/NetPoint.hpp" #include "src/surf/HostImpl.hpp" #include "xbt/utility.hpp" @@ -320,7 +321,7 @@ void surf_exit() { TRACE_end(); /* Just in case it was not called by the upper layer (or there is no upper layer) */ - sg_host_exit(); + simgrid::s4u::Engine::shutdown(); sg_link_exit(); for (auto const& e : storage_types) { simgrid::surf::StorageType* stype = e.second; @@ -345,7 +346,6 @@ void surf_exit() tmgr_finalize(); sg_platf_exit(); - simgrid::s4u::Engine::shutdown(); NOW = 0; /* Just in case the user plans to restart the simulation afterward */ } @@ -375,6 +375,8 @@ Model::~Model(){ delete runningActionSet_; delete failedActionSet_; delete doneActionSet_; + delete modifiedSet_; + delete maxminSystem_; } Action* Model::actionHeapPop() @@ -540,6 +542,11 @@ void Resource::turnOff() isOn_ = false; } +double Resource::getLoad() +{ + return constraint_->get_usage(); +} + Model* Resource::model() const { return model_;