Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[ci-skip] document s4u::Task
[simgrid.git] / src / smpi / internals / smpi_global.cpp
index fce781e94cc7a45aaac961ad47e171f507f79a6e..36a3e39101d7249e880bb38163809c28a56d1e4c 100644 (file)
@@ -3,7 +3,6 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "mc/mc.h"
 #include "simgrid/Exception.hpp"
 #include "simgrid/plugins/file_system.h"
 #include "simgrid/s4u/Engine.hpp"
@@ -13,6 +12,7 @@
 #include "smpi_host.hpp"
 #include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/activity/CommImpl.hpp"
+#include "src/mc/mc.h"
 #include "src/mc/mc_replay.hpp"
 #include "src/smpi/include/smpi_actor.hpp"
 #include "xbt/config.hpp"
@@ -36,7 +36,7 @@
 #endif
 
 #if HAVE_PAPI
-#include "papi.h"
+#include <papi.h>
 #endif
 
 #if not defined(__APPLE__) && not defined(__HAIKU__)
@@ -520,6 +520,10 @@ int smpi_main(const char* executable, int argc, char* argv[])
      * configuration tools */
     return 0;
   }
+  if (argv[0] == std::string("--help-coll")) {
+    std::cerr << simgrid::smpi::colls::get_smpi_coll_help();
+    return 0;
+  }
 
   smpi_init_options_internal(true);
   simgrid::s4u::Engine engine(&argc, argv);
@@ -529,6 +533,9 @@ int smpi_main(const char* executable, int argc, char* argv[])
   engine.load_platform(argv[1]);
   engine.set_default_comm_data_copy_callback(smpi_comm_copy_buffer_callback);
 
+  xbt_assert(not MC_is_active() || smpi_cfg_privatization() != SmpiPrivStrategies::MMAP,
+             "Please use the dlopen privatization schema when model-checking SMPI code");
+
   if (smpi_cfg_privatization() == SmpiPrivStrategies::DLOPEN)
     smpi_init_privatization_dlopen(executable);
   else