Salome HOME
updated copyright message
[tools/medcoupling.git] / src / ParaMEDMEMTest / MPI2Connector.cxx
index 87b16bfb24419b64d54e43f132831ec307c57f70..4c5998f462542fa57103c4c679c045e762f64ac4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include <unistd.h>
 #endif
 
-#if OMPI_MAJOR_VERSION >= 4
-#define MPI_ERROR_HANDLER(var) MPI_Comm_set_errhandler(MPI_COMM_WORLD, var);
-#else
-#define MPI_ERROR_HANDLER(var) MPI_Errhandler_set(MPI_COMM_WORLD, var);
+
+#ifdef OMPI_MAJOR_VERSION 
+#   if OMPI_MAJOR_VERSION >= 4
+#      define MPI_ERROR_HANDLER(var) MPI_Comm_set_errhandler(MPI_COMM_WORLD, var)
+#   else
+#      define MPI_ERROR_HANDLER(var) MPI_Errhandler_set(MPI_COMM_WORLD, var)
+#   endif
+#else  // MPICH and other versions:
+#   define MPI_ERROR_HANDLER(var) MPI_Errhandler_set(MPI_COMM_WORLD, var)
 #endif
 
 MPI2Connector::MPI2Connector()