From 86120859fddc30295a7f397c6c5fe29c6d711ba9 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 28 Apr 2018 14:17:26 +0200 Subject: [PATCH] Add MPI version check --- cmake/modules/FindMPI.cmake | 2 ++ include/deal.II/base/config.h.in | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/cmake/modules/FindMPI.cmake b/cmake/modules/FindMPI.cmake index 577f9082f9..e88f0d4053 100644 --- a/cmake/modules/FindMPI.cmake +++ b/cmake/modules/FindMPI.cmake @@ -22,6 +22,8 @@ # MPI_CXX_FLAGS # MPI_LINKER_FLAGS # MPI_VERSION +# MPI_VERSION_MAJOR +# MPI_VERSION_MINOR # OMPI_VERSION # MPI_HAVE_MPI_SEEK_SET # diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index ee542a1f62..383ad47fac 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -317,6 +317,20 @@ (major)*10000 + (minor)*100 + (subminor)) #endif +/* + * MPI + */ + +#ifdef DEAL_II_WITH_MPI +# define DEAL_II_MPI_VERSION_MAJOR @MPI_VERSION_MAJOR@ +# define DEAL_II_MPI_VERSION_MINOR @MPI_VERSION_MINOR@ + +# define DEAL_II_MPI_VERSION_GTE(major,minor) \ + ((DEAL_II_MPI_VERSION_MAJOR * 100 + \ + DEAL_II_MPI_VERSION_MINOR) \ + >= \ + (major)*100 + (minor)) +#endif /*********************************************************************** * Two macro names that we put at the top and bottom of all deal.II files -- 2.39.5