Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Apply "smpi/buffering" when MC_record_replay_is_active too.
[simgrid.git] / src / smpi / internals / smpi_config.cpp
index d4e357b..614a00e 100644 (file)
   #undef _GNU_SOURCE
 #endif
 
-#include "smpi_config.hpp"
-#include "include/xbt/config.hpp"
-#include "mc/mc.h"
 #include "private.hpp"
 #include "smpi_coll.hpp"
+#include "smpi_config.hpp"
+#include "src/mc/mc.h"
+#include "xbt/config.hpp"
 #include "xbt/ex.h"
 #include "xbt/parse_units.hpp"
 
@@ -35,6 +35,7 @@
 
 #if SIMGRID_HAVE_MC
 #include "src/mc/mc_config.hpp"
+#include "src/mc/mc_replay.hpp"
 #endif
 
 #if defined(__APPLE__)
 # ifndef MAC_OS_X_VERSION_10_12
 #   define MAC_OS_X_VERSION_10_12 101200
 # endif
+# ifndef __MAC_11_0
+#   define __MAC_11_0 110000
+# endif
 
-constexpr bool HAVE_WORKING_MMAP = (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12);
+constexpr bool HAVE_WORKING_MMAP = ((MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12) && (MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_11_0));
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__sun) || defined(__HAIKU__) || defined(__MUSL__)
 constexpr bool HAVE_WORKING_MMAP = false;
 #else
@@ -305,7 +309,7 @@ void smpi_init_options_internal(bool called_by_smpi_main)
 void smpi_check_options()
 {
 #if SIMGRID_HAVE_MC
-  if (MC_is_active()) {
+  if (MC_is_active() || MC_record_replay_is_active()) {
     if (_sg_mc_buffering == "zero")
       simgrid::config::set_value<int>("smpi/send-is-detached-thresh", 0);
     else if (_sg_mc_buffering == "infty")