Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add smpi/pedantic flag to avoiding reporting controversial errors that may or may...
authorAugustin Degomme <adegomme@gmail.com>
Mon, 14 Jun 2021 12:08:23 +0000 (14:08 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Mon, 14 Jun 2021 12:08:23 +0000 (14:08 +0200)
ChangeLog
docs/source/Configuring_SimGrid.rst
src/smpi/include/smpi_config.hpp
src/smpi/internals/smpi_config.cpp

index 861f3ed..f9f3883 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,8 @@ SMPI:
       data attached to a process, but still used in other SMPI processes.
     --cfg=smpi/errors-are-fatal: True by default, behaves like if MPI_ERRORS_RETURN
       is active when set to false, to keep going after a small error
       data attached to a process, but still used in other SMPI processes.
     --cfg=smpi/errors-are-fatal: True by default, behaves like if MPI_ERRORS_RETURN
       is active when set to false, to keep going after a small error
+    --cfg=smpi/pedantic: True by default. Do not report some harmless MPI errors
+      which may or may not be problematic in the end.
 LUA:
  - Lua platform files are deprecated. Their support will be dropped after v3.31.
 
 LUA:
  - Lua platform files are deprecated. Their support will be dropped after v3.31.
 
index b2718c0..bdb37ce 100644 (file)
@@ -164,6 +164,7 @@ Existing Configuration Items
 - **smpi/or:** :ref:`cfg=smpi/or`
 - **smpi/os:** :ref:`cfg=smpi/os`
 - **smpi/papi-events:** :ref:`cfg=smpi/papi-events`
 - **smpi/or:** :ref:`cfg=smpi/or`
 - **smpi/os:** :ref:`cfg=smpi/os`
 - **smpi/papi-events:** :ref:`cfg=smpi/papi-events`
+- **smpi/pedantic:** :ref:`cfg=smpi/pedantic`
 - **smpi/privatization:** :ref:`cfg=smpi/privatization`
 - **smpi/privatize-libs:** :ref:`cfg=smpi/privatize-libs`
 - **smpi/send-is-detached-thresh:** :ref:`cfg=smpi/send-is-detached-thresh`
 - **smpi/privatization:** :ref:`cfg=smpi/privatization`
 - **smpi/privatize-libs:** :ref:`cfg=smpi/privatize-libs`
 - **smpi/send-is-detached-thresh:** :ref:`cfg=smpi/send-is-detached-thresh`
@@ -1335,6 +1336,17 @@ to explicitely set MPI_ERRORS_RETURN errhandler to avoid this behaviour. This fl
 will turn on this behaviour by default (for all concerned types and errhandlers).
 This can ease debugging by going after the first reported error.
 
 will turn on this behaviour by default (for all concerned types and errhandlers).
 This can ease debugging by going after the first reported error.
 
+.. _cfg=smpi/pedantic:
+
+**Option** ``smpi/pedantic`` **default:** on
+
+By default, SMPI will report all errors it finds in MPI codes. Some of these errors
+may not be considered as errors by all developers. This flag can be turned off to
+avoid reporting some usually harmless mistakes.
+Concerned errors list (will be expanded in the future):
+  - Calling MPI_Win_fence only once in a program, hence just opening an epoch without
+  ever closing it.
+
 .. _cfg=smpi/iprobe:
 
 Inject constant times for MPI_Iprobe
 .. _cfg=smpi/iprobe:
 
 Inject constant times for MPI_Iprobe
index 60d81ed..2eb9706 100644 (file)
@@ -24,6 +24,7 @@ extern XBT_PRIVATE simgrid::config::Flag<bool> _smpi_cfg_trace_call_use_absolute
 extern XBT_PRIVATE simgrid::config::Flag<bool> _smpi_cfg_trace_call_location;
 extern XBT_PRIVATE simgrid::config::Flag<std::string> _smpi_cfg_comp_adjustment_file;
 extern XBT_PRIVATE simgrid::config::Flag<bool> _smpi_cfg_default_errhandler_is_error;
 extern XBT_PRIVATE simgrid::config::Flag<bool> _smpi_cfg_trace_call_location;
 extern XBT_PRIVATE simgrid::config::Flag<std::string> _smpi_cfg_comp_adjustment_file;
 extern XBT_PRIVATE simgrid::config::Flag<bool> _smpi_cfg_default_errhandler_is_error;
+extern XBT_PRIVATE simgrid::config::Flag<bool> _smpi_cfg_pedantic;
 #if HAVE_PAPI
 extern XBT_PRIVATE simgrid::config::Flag<std::string> _smpi_cfg_papi_events_file;
 #endif
 #if HAVE_PAPI
 extern XBT_PRIVATE simgrid::config::Flag<std::string> _smpi_cfg_papi_events_file;
 #endif
index b7cd540..0c5dfcc 100644 (file)
@@ -111,6 +111,8 @@ simgrid::config::Flag<std::string> _smpi_cfg_comp_adjustment_file{"smpi/comp-adj
 
 simgrid::config::Flag<bool> _smpi_cfg_default_errhandler_is_error{
   "smpi/errors-are-fatal", "Whether MPI errors are fatal or just return. Default is true", true };
 
 simgrid::config::Flag<bool> _smpi_cfg_default_errhandler_is_error{
   "smpi/errors-are-fatal", "Whether MPI errors are fatal or just return. Default is true", true };
+simgrid::config::Flag<bool> _smpi_cfg_pedantic{
+  "smpi/pedantic", "Activate extra checks that may crash slightly incorrect codes which would not crash on actual implementations", true };
 #if HAVE_PAPI
   simgrid::config::Flag<std::string> _smpi_cfg_papi_events_file{"smpi/papi-events",
                                                                 "This switch enables tracking the specified counters with PAPI", ""};
 #if HAVE_PAPI
   simgrid::config::Flag<std::string> _smpi_cfg_papi_events_file{"smpi/papi-events",
                                                                 "This switch enables tracking the specified counters with PAPI", ""};