Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Replay: Use correct buffer (recvbuffer)
[simgrid.git] / src / smpi / bindings / smpi_mpi.cpp
index 4bf204a..b388f68 100644 (file)
@@ -1,22 +1,28 @@
-/* Copyright ,(c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
 
 #include "private.hpp"
-#include "simgrid/sg_config.h"
+#include "simgrid/sg_config.hpp"
 
 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;                                                                                                \
   }
 
@@ -46,7 +52,6 @@ return P##name args2 ; \
 
 
 /* MPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 WRAPPED_PMPI_CALL(double, MPI_Wtick,(void),())
 WRAPPED_PMPI_CALL(double, MPI_Wtime,(void),())
@@ -391,5 +396,3 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(int,MPI_Win_set_errhandler,(MPI_Win win,
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Win_test,(MPI_Win win, int *flag),(win, flag))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Errhandler, MPI_Errhandler_f2c,(MPI_Fint errhandler),(errhandler))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Fint, MPI_Errhandler_c2f,(MPI_Errhandler errhandler),(errhandler))
-
-} // extern "C"