]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Add a check to ensure a working MPI interface
authorMatthias Maier <tamiko@43-1.org>
Wed, 13 Jul 2016 14:50:25 +0000 (09:50 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 14 Jul 2016 00:46:26 +0000 (19:46 -0500)
cmake/configure/configure_1_mpi.cmake

index 781c47c8069b96cbe9075769266b42e6f9c8697a..6254ec58e534846d047ce15138f6596e580dda1c 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2015 by the deal.II authors
+## Copyright (C) 2012 - 2016 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -28,7 +28,25 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var)
         "Could not find a sufficient MPI version: "
         "Your MPI implementation must define MPI_SEEK_SET.")
       SET(MPI_ADDITIONAL_ERROR_STRING
-        "Your MPI implementation must define MPI_SEEK_SET.")
+        "Your MPI implementation must define MPI_SEEK_SET.\n")
+      SET(${var} FALSE)
+    ENDIF()
+
+    CHECK_COMPILER_SETUP(
+      "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_SAVED} ${MPI_CXX_FLAGS}"
+      "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_SAVED} ${MPI_LINKER_FLAGS}"
+      MPI_WORKING_COMPILER
+      ${DEAL_II_LIBRARIES} ${MPI_LIBRARIES}
+      )
+
+    IF(NOT MPI_WORKING_COMPILER)
+      MESSAGE(STATUS "Could not find a sufficient MPI installation: "
+        "Unable to compile a simple test program."
+        )
+      SET(MPI_ADDITIONAL_ERROR_STRING
+        ${MPI_ADDITIONAL_ERROR_STRING}
+        "Unable to compile and link a simple test program with your MPI installation. \n"
+        )
       SET(${var} FALSE)
     ENDIF()
   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.