]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add MPI detection
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 1 Jul 2010 19:27:46 +0000 (19:27 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 1 Jul 2010 19:27:46 +0000 (19:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@21437 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/report_features.cc

index 61d0cb2ce88e59fa15ef11238325d7eb7a9ecc6c..0bae78f8dde22dce76daca279a62bf96e83b4a61 100644 (file)
@@ -21,6 +21,10 @@ extern "C" {
 }
 #endif
 
+#if defined(DEAL_II_COMPILER_SUPPORTS_MPI) || defined(DEAL_II_USE_PETSC)
+#include <mpi.h>
+#endif
+
 #ifdef DEAL_II_USE_MUMPS
 #  include <base/utilities.h>
 #  include <dmumps_c.h>
@@ -30,6 +34,7 @@ extern "C" {
 #  include <slepcversion.h>
 #endif
 
+
 int main()
 {
 #ifdef HAVE_LIBBLAS
@@ -47,6 +52,19 @@ int main()
            << UMFPACK_SUBSUB_VERSION << std::endl;
 #endif
 
+#if defined(DEAL_II_COMPILER_SUPPORTS_MPI) || defined(DEAL_II_USE_PETSC)
+#  ifdef OMPI_MAJOR_VERSION
+  std::cout << "dealii-feature: MPI=OpenMPI<br>"
+           << OMPI_MAJOR_VERSION << '.'
+           << OMPI_MINOR_VERSION << '.'
+           << OMPI_RELEASE_VERSION << std::endl;
+#  else
+  std::cout << "dealii-feature: MPI="
+           << MPI__VERSION << '.'
+           << MPI_SUBVERSION << std::endl;  
+#  endif
+#endif
+
 #ifdef DEAL_II_USE_MUMPS
   std::cout << "dealii-feature: MUMPS=yes" << std::endl;
 #endif

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.