Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix proxy-apps but not the new smpi faulty test
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Fri, 24 Sep 2021 09:29:23 +0000 (11:29 +0200)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Fri, 24 Sep 2021 09:29:23 +0000 (11:29 +0200)
include/simgrid/s4u/Engine.hpp
src/kernel/EngineImpl.cpp
src/kernel/EngineImpl.hpp
src/simdag/sd_global.cpp

index 83f92bb..c57dc8c 100644 (file)
@@ -41,7 +41,7 @@ public:
 #endif
 
   /** Finalize the default engine and all its dependencies */
-  static void shutdown();
+  void shutdown();
 
   /** Run the simulation after initialization */
   void run() const;
index 8f0b6ca..4d5cf7e 100644 (file)
@@ -209,7 +209,7 @@ void EngineImpl::initialize(int* argc, char** argv)
   s4u::Engine::on_platform_created.connect(surf_presolve);
 
   if (config::get_value<bool>("debug/clean-atexit"))
-    atexit(s4u::Engine::shutdown);
+    atexit(shutdown);
 }
 
 void EngineImpl::shutdown()
@@ -217,13 +217,6 @@ void EngineImpl::shutdown()
   if (EngineImpl::instance_ == nullptr)
     return;
   XBT_DEBUG("EngineImpl::shutdown() called. Simulation's over.");
-  if (instance_->has_actors_to_run() && simgrid_get_clock() <= 0.0) {
-    XBT_CRITICAL("   ");
-    XBT_CRITICAL("The time is still 0, and you still have processes ready to run.");
-    XBT_CRITICAL("It seems that you forgot to run the simulation that you setup.");
-    xbt_die("Bailing out to avoid that stop-before-start madness. Please fix your code.");
-  }
-
 #if HAVE_SMPI
   if (not instance_->actor_list_.empty()) {
     if (smpi_process()->initialized()) {
@@ -235,6 +228,13 @@ void EngineImpl::shutdown()
   }
 #endif
 
+  if (instance_->has_actors_to_run() && simgrid_get_clock() <= 0.0) {
+    XBT_CRITICAL("   ");
+    XBT_CRITICAL("The time is still 0, and you still have processes ready to run.");
+    XBT_CRITICAL("It seems that you forgot to run the simulation that you setup.");
+    xbt_die("Bailing out to avoid that stop-before-start madness. Please fix your code.");
+  }
+
   /* Kill all actors (but maestro) */
   instance_->maestro_->kill_all();
   instance_->run_all_actors();
index d5f7445..f8f921c 100644 (file)
@@ -88,7 +88,7 @@ public:
   EngineImpl(const EngineImpl&) = delete;
   EngineImpl& operator=(const EngineImpl&) = delete;
   virtual ~EngineImpl();
-  void shutdown();
+  static void shutdown();
 #endif
 
   void initialize(int* argc, char** argv);
index 438d1d4..fa386cd 100644 (file)
@@ -237,5 +237,5 @@ void SD_exit()
 #if SIMGRID_HAVE_JEDULE
   jedule_sd_exit();
 #endif
-  simgrid::s4u::Engine::shutdown();
+  sd_global->engine_->shutdown();
 }