From b6d36220513911046d270d6493813e30ea9397d8 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 29 Sep 2020 11:45:28 +0300 Subject: [PATCH] Fix compilation with openmpi < 4.0 --- src/ParaMEDMEMTest/MPI2Connector.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ParaMEDMEMTest/MPI2Connector.cxx b/src/ParaMEDMEMTest/MPI2Connector.cxx index a8a5bc432..ddcba11c2 100644 --- a/src/ParaMEDMEMTest/MPI2Connector.cxx +++ b/src/ParaMEDMEMTest/MPI2Connector.cxx @@ -29,10 +29,12 @@ #ifdef OMPI_MAJOR_VERSION # if OMPI_MAJOR_VERSION >= 4 -# define MPI_ERROR_HANDLER(var) MPI_Comm_set_errhandler(MPI_COMM_WORLD, var); +# 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); +# define MPI_ERROR_HANDLER(var) MPI_Errhandler_set(MPI_COMM_WORLD, var) #endif MPI2Connector::MPI2Connector() -- 2.39.2