From: Augustin Degomme Date: Mon, 14 Jun 2021 12:08:23 +0000 (+0200) Subject: Add smpi/pedantic flag to avoiding reporting controversial errors that may or may... X-Git-Tag: v3.28~99 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5d3cc4fa4b1428899a036b2a7c2b9c038673ed4d Add smpi/pedantic flag to avoiding reporting controversial errors that may or may not be important. --- diff --git a/ChangeLog b/ChangeLog index 861f3ed647..f9f388319d 100644 --- 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 + --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. diff --git a/docs/source/Configuring_SimGrid.rst b/docs/source/Configuring_SimGrid.rst index b2718c006b..bdb37cee8e 100644 --- a/docs/source/Configuring_SimGrid.rst +++ b/docs/source/Configuring_SimGrid.rst @@ -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/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` @@ -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. +.. _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 diff --git a/src/smpi/include/smpi_config.hpp b/src/smpi/include/smpi_config.hpp index 60d81ed788..2eb9706b17 100644 --- a/src/smpi/include/smpi_config.hpp +++ b/src/smpi/include/smpi_config.hpp @@ -24,6 +24,7 @@ extern XBT_PRIVATE simgrid::config::Flag _smpi_cfg_trace_call_use_absolute extern XBT_PRIVATE simgrid::config::Flag _smpi_cfg_trace_call_location; extern XBT_PRIVATE simgrid::config::Flag _smpi_cfg_comp_adjustment_file; extern XBT_PRIVATE simgrid::config::Flag _smpi_cfg_default_errhandler_is_error; +extern XBT_PRIVATE simgrid::config::Flag _smpi_cfg_pedantic; #if HAVE_PAPI extern XBT_PRIVATE simgrid::config::Flag _smpi_cfg_papi_events_file; #endif diff --git a/src/smpi/internals/smpi_config.cpp b/src/smpi/internals/smpi_config.cpp index b7cd540240..0c5dfcc98b 100644 --- a/src/smpi/internals/smpi_config.cpp +++ b/src/smpi/internals/smpi_config.cpp @@ -111,6 +111,8 @@ simgrid::config::Flag _smpi_cfg_comp_adjustment_file{"smpi/comp-adj simgrid::config::Flag _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 _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 _smpi_cfg_papi_events_file{"smpi/papi-events", "This switch enables tracking the specified counters with PAPI", ""};