From 7eb90b3740c46ed997205580a5f3e0eecd938b4c Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 30 Dec 2022 10:48:46 +0100 Subject: [PATCH] Require Trilinos 13.2 if it includes Kokkos --- cmake/configure/configure_20_trilinos.cmake | 20 +++++++++++++++++++- doc/external-libs/trilinos.html | 3 ++- doc/news/changes/20221230DanielArndt | 4 ++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 doc/news/changes/20221230DanielArndt diff --git a/cmake/configure/configure_20_trilinos.cmake b/cmake/configure/configure_20_trilinos.cmake index ea317beb7a..38557e7c88 100644 --- a/cmake/configure/configure_20_trilinos.cmake +++ b/cmake/configure/configure_20_trilinos.cmake @@ -185,6 +185,24 @@ macro(feature_trilinos_find_external var) set(${var} FALSE) endif() + # + # We require at least Trilinos 13.2 + # + if(TRILINOS_VERSION VERSION_LESS 13.2) + message(STATUS "Could not find a sufficient Trilinos installation: " + "deal.II requires at least version 13.2 if the Trilinos installation includes Kokkos, " + "but version ${TRILINOS_VERSION} was found." + ) + set(TRILINOS_ADDITIONAL_ERROR_STRING + ${TRILINOS_ADDITIONAL_ERROR_STRING} + "The Trilinos installation (found at \"${TRILINOS_DIR}\")\n" + "with version ${TRILINOS_VERSION} is too old.\n" + "deal.II requires at least version 13.2 if the Trilinos installation includes Kokkos.\n\n" + ) + set(${var} FALSE) + endif() + + if(Kokkos_ENABLE_CUDA) # We need to disable SIMD vectorization for CUDA device code. # Otherwise, nvcc compilers from version 9 on will emit an error message like: @@ -267,7 +285,7 @@ macro(feature_trilinos_find_external var) main() { Epetra_CrsMatrix *matrix; - const auto teuchos_wrapped_matrix = Teuchos::rcp(matrix, false); + const auto teuchos_wrapped_matrix = Teuchos::rcp(matrix, false); Teuchos::ParameterList parameters; MueLu::CreateEpetraPreconditioner(teuchos_wrapped_matrix, parameters); return 0; diff --git a/doc/external-libs/trilinos.html b/doc/external-libs/trilinos.html index 91ec66250d..169695583e 100644 --- a/doc/external-libs/trilinos.html +++ b/doc/external-libs/trilinos.html @@ -49,7 +49,8 @@
Installing Trilinos

- Note: The current version of deal.II requires at least Trilinos 12.4. + Note: The current version of deal.II requires at least Trilinos 12.4 + (13.2 if Trilinos includes Kokkos). Deal.II is known to work with Trilinos up to 13.4. Other versions of Trilinos should work too but have not been tested prior to the release. diff --git a/doc/news/changes/20221230DanielArndt b/doc/news/changes/20221230DanielArndt new file mode 100644 index 0000000000..4b5055a8a1 --- /dev/null +++ b/doc/news/changes/20221230DanielArndt @@ -0,0 +1,4 @@ +Updated: The minimum version for Trilinos has been bumped to 13.2 if Trilinos +bundles Kokkkos. +
+(Daniel Arndt, 2022/12/30) -- 2.39.5