-/* 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", __func__); \
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", \
+ __func__); \
+ warning_todo = false; \
return MPI_SUCCESS; \
}
-#define WRAPPED_PMPI_CALL(type,name,args,args2) \
-type name args { \
- XBT_VERB("SMPI - Entering %s", __FUNCTION__);\
- type ret = P##name args2 ; \
- XBT_VERB("SMPI - Leaving %s", __FUNCTION__);\
- return ret;\
-}\
+#define WRAPPED_PMPI_CALL(type, name, args, args2) \
+ type name args \
+ { \
+ XBT_VERB("SMPI - Entering %s", __func__); \
+ type ret = P##name args2; \
+ XBT_VERB("SMPI - Leaving %s", __func__); \
+ return ret; \
+ }
#define UNIMPLEMENTED_WRAPPED_PMPI_CALL(type,name,args,args2) \
type P##name args { \
/* 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),())
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"