]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add MPI version check
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 28 Apr 2018 12:17:26 +0000 (14:17 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 29 Apr 2018 09:55:01 +0000 (11:55 +0200)
cmake/modules/FindMPI.cmake
include/deal.II/base/config.h.in

index 577f9082f951711d8bf9b53dc1ba218fbce566a0..e88f0d40539d56e72edc5ca41e760968f7782cfd 100644 (file)
@@ -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
 #
index ee542a1f62508bc9473df9c48a33753f18a0981a..383ad47fac1c827ab154f490417396ed87d40016 100644 (file)
     (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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.