From: Daniel Arndt Date: Sat, 28 Apr 2018 12:17:26 +0000 (+0200) Subject: Add MPI version check X-Git-Tag: v9.0.0-rc1~65^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86120859fddc30295a7f397c6c5fe29c6d711ba9;p=dealii.git Add MPI version check --- 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