Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SMPI: only warn once on unimplemented calls
[simgrid.git] / src / smpi / bindings / smpi_mpi.cpp
index 4bf204a..483f17d 100644 (file)
@@ -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" "Continuing, because this call is not critical." "Hide this message by setting --log=smpi_mpi.thresh:info", __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;                                                                                                \
   }