X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMPIContainer%2FtestMPI2.cxx;h=163e1fa13486180ddcd36cd618a44f7531242180;hb=1f3b94b59127cc48e7e840ab84e85087f538309a;hp=d55645256c3f933f0c2a04b8a1850f1324cc9b41;hpb=e33cb6cc033a04b4c4373a3cfb9a62eb2c121845;p=modules%2Fkernel.git diff --git a/src/MPIContainer/testMPI2.cxx b/src/MPIContainer/testMPI2.cxx index d55645256..163e1fa13 100644 --- a/src/MPIContainer/testMPI2.cxx +++ b/src/MPIContainer/testMPI2.cxx @@ -58,8 +58,12 @@ int main(int argc, char**argv) MPI_Comm_rank( MPI_COMM_WORLD, &rank ); 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 + #ifdef HAVE_MPI2 MPI_Info_create(&info); MPI_Info_set(info, "ompi_unique", "true"); @@ -105,7 +109,11 @@ int main(int argc, char**argv) exit(1); } } +#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 MPI_Bcast(&srv,1,MPI_INT,0,MPI_COMM_WORLD); if ( srv ) MPI_Comm_accept( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &icom );