From 78d028b6abfd9ae331fddb2123c3491869867649 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 23 Mar 2018 22:53:28 +0100 Subject: [PATCH] SMPI: only warn once on unimplemented calls --- src/smpi/bindings/smpi_mpi.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/smpi/bindings/smpi_mpi.cpp b/src/smpi/bindings/smpi_mpi.cpp index 92442a00d5..483f17dce3 100644 --- a/src/smpi/bindings/smpi_mpi.cpp +++ b/src/smpi/bindings/smpi_mpi.cpp @@ -10,13 +10,19 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi) #define NOT_YET_IMPLEMENTED \ { \ - xbt_die("Not yet implemented : %s. Please contact the SimGrid team if support is needed", __FUNCTION__); \ + xbt_die("Not yet implemented: %s. Please contact the SimGrid team if support is needed", __FUNCTION__); \ return MPI_SUCCESS; \ } - -#define NOT_YET_IMPLEMENTED_NOFAIL \ + +#define NOT_YET_IMPLEMENTED_NOFAIL \ { \ - XBT_WARN("Not yet implemented : %s. Please contact the SimGrid team if support is needed. Run with --log=smpi_mpi.thresh:error to hide", __FUNCTION__); \ + static bool warning_todo = true; \ + if (warning_todo) \ + XBT_WARN("Not yet implemented: %s. " \ + "Please contact the SimGrid team if support is needed. " \ + "Run with --log=smpi_mpi.thresh:error to hide", \ + __FUNCTION__); \ + warning_todo = false; \ return MPI_SUCCESS; \ } -- 2.20.1