]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Checking if MPI is enabled to allow both Trilinos and PETSc.
authorFranco Milicchio <fmilicchio@me.com>
Fri, 12 Jul 2019 13:37:23 +0000 (15:37 +0200)
committerFranco Milicchio <fmilicchio@me.com>
Fri, 12 Jul 2019 13:37:23 +0000 (15:37 +0200)
cmake/configure/configure_2_trilinos.cmake

index b3537851d6e3441f353fd9fc65200d6a6eaf5234..0472228b2034217ce626208201c79401b9dc3eb4 100644 (file)
@@ -103,6 +103,25 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       SET(${var} FALSE)
     ENDIF()
 
+    #
+    # deal.II has to be configured with MPI if both Trilinos and PETSc are
+    # enabled.
+    #
+    IF( DEAL_II_WITH_TRILINOS AND DEAL_II_WITH_PETSC AND NOT DEAL_II_WITH_MPI )
+      MESSAGE(STATUS "Incompatible configuration settings: "
+        "MPI must be enabled to use both Trilinos and PETSc."
+        )
+      SET(TRILINOS_ADDITIONAL_ERROR_STRING
+        ${TRILINOS_ADDITIONAL_ERROR_STRING}
+        "To enable both Trilinos and PETSc, deal.II must be configured with MPI "
+        "or enable one between Trilinos and PETSc removing MPI, but found:\n"
+        "  DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n"
+        "  DEAL_II_WITH_TRILINOS = ${DEAL_II_WITH_TRILINOS}\n"
+        "  DEAL_II_WITH_PETSC = ${DEAL_II_WITH_PETSC}\n"
+        )
+      SET(${var} FALSE)
+    ENDIF()
+
     #
     # Trilinos has to be configured with 32bit indices if deal.II uses
     # unsigned int.

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.