From 75696e1457aa70dc3b9ce6e2abbb93de28698e10 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 3 Aug 2020 21:59:06 +0300 Subject: [PATCH] Build KERNEL with native openmpi on CentOS-8 --- src/ParaMEDMEMTest/MPI2Connector.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ParaMEDMEMTest/MPI2Connector.cxx b/src/ParaMEDMEMTest/MPI2Connector.cxx index 9b7844ad2..ef55de0f8 100644 --- a/src/ParaMEDMEMTest/MPI2Connector.cxx +++ b/src/ParaMEDMEMTest/MPI2Connector.cxx @@ -54,8 +54,11 @@ MPI_Comm MPI2Connector::remoteMPI2Connect(const std::string& service) _srv = false; MPI_Barrier(MPI_COMM_WORLD); - +#if OMPI_MAJOR_VERSION >= 4 + MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); +#else MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); +#endif if( _num_proc == 0 ) { /* rank 0 try to be a server. If service is already published, try to be a cient */ @@ -104,7 +107,11 @@ MPI_Comm MPI2Connector::remoteMPI2Connect(const std::string& service) throw std::exception(); } } +#if OMPI_MAJOR_VERSION >= 4 + MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); +#else MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); +#endif /* If rank 0 is server, all processes call MPI_Comm_accept */ /* If rank 0 is not server, all processes call MPI_Comm_connect */ -- 2.39.2