]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/EngineImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make distcheck
[simgrid.git] / src / kernel / EngineImpl.cpp
index 5a6dd12129e734dcaa33972497b8a050e2a888ef..377f2b5795e2c16637d4f9d7d20e450fc7c4d841 100644 (file)
@@ -14,6 +14,7 @@
 #include "src/kernel/resource/profile/Profile.hpp"
 #include "src/kernel/xml/platf.hpp"
 #include "src/mc/mc.h"
+#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_record.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/simgrid/math_utils.h"
@@ -175,7 +176,7 @@ void EngineImpl::initialize(int* argc, char** argv)
   // The communication initialization is done ASAP, as we need to get some init parameters from the MC for different
   // layers. But instance_ needs to be created, as we send the address of some of its fields to the MC that wants to
   // read them directly.
-  simgrid::mc::AppSide::initialize();
+  simgrid::mc::AppSide::get(); // To ensure that it's initialized
 #endif
 
   if (static bool inited = false; not inited) {
@@ -511,9 +512,9 @@ double EngineImpl::solve(double max_date) const
 
   XBT_DEBUG("Looking for next event in all models");
   for (auto model : models_) {
-    if (not model->next_occurring_event_is_idempotent()) {
+    if (not model->next_occurring_event_is_idempotent())
       continue;
-    }
+
     double next_event = model->next_occurring_event(now_);
     if ((time_delta < 0.0 || next_event < time_delta) && next_event >= 0.0) {
       time_delta = next_event;
@@ -604,6 +605,9 @@ void EngineImpl::run(double max_date)
 {
   seal_platform();
 
+  XBT_DEBUG("Running the main loop until t=%.3f in mode %s", max_date,
+            to_c_str(simgrid::mc::get_model_checking_mode()));
+
   if (MC_is_active()) {
 #if SIMGRID_HAVE_MC
     mc::AppSide::get()->main_loop();