Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Convert integer literals to bool literals.
[simgrid.git] / src / mc / mc_config.cpp
index b1a70e3..fbb7f7c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2020. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -9,7 +9,7 @@
 #include "src/mc/mc_safety.hpp"
 #endif
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_config, mc, "Configuration of the Model Checker");
+#include <climits>
 
 #if SIMGRID_HAVE_MC
 namespace simgrid {
@@ -18,9 +18,7 @@ namespace mc {
 simgrid::mc::ReductionMode reduction_mode = simgrid::mc::ReductionMode::unset;
 }
 }
-#endif
-
-#if !SIMGRID_HAVE_MC
+#else
 #define _sg_do_model_check 0
 #endif
 
@@ -73,6 +71,14 @@ simgrid::config::Flag<bool> _sg_mc_send_determinism{
       _mc_cfg_cb_check("value to enable/disable the detection of send-determinism in the communications schemes");
     }};
 
+simgrid::config::Flag<std::string> _sg_mc_buffering{
+    "smpi/buffering",
+    "Buffering semantic to use for MPI (only used in MC)",
+    "infty",
+    {{"zero", "No system buffering: MPI_Send is blocking"},
+     {"infty", "Infinite system buffering: MPI_Send returns immediately"}},
+    [](const std::string&) { _mc_cfg_cb_check("buffering mode"); }};
+
 static simgrid::config::Flag<std::string> _sg_mc_reduce{
     "model-check/reduction", "Specify the kind of exploration reduction (either none or DPOR)", "dpor",
     [](const std::string& value) {
@@ -86,10 +92,6 @@ static simgrid::config::Flag<std::string> _sg_mc_reduce{
         xbt_die("configuration option model-check/reduction can only take 'none' or 'dpor' as a value");
     }};
 
-simgrid::config::Flag<bool> _sg_mc_hash{
-    "model-check/hash", "Whether to enable state hash for state comparison (experimental)", false,
-    [](bool) { _mc_cfg_cb_check("value to enable/disable the use of global hash to speedup state comparaison"); }};
-
 simgrid::config::Flag<int> _sg_mc_max_depth{"model-check/max-depth",
                                             {"model-check/max_depth"},
                                             "Maximal exploration depth (default: 1000)",