Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,25 @@ jobs:
compare-tests: "ON"
result-file: "changes-test-results-9.6.diff"
container-options: '--user 0 --name container'
use-tpetra: "OFF"
- image: "geodynamics/aspect-tester:jammy-dealii-9.7-v3"
run-tests: "ON"
compare-tests: "OFF"
result-file: "changes-test-results-9.7.diff"
container-options: '--user 0 --name container'
use-tpetra: "OFF"
- image: "geodynamics/aspect-tester:jammy-dealii-master"
run-tests: "ON"
compare-tests: "OFF"
result-file: "changes-test-results-master.diff"
container-options: '--user 0 --name container'

use-tpetra: "OFF"
- image: "geodynamics/aspect-tester:jammy-dealii-master"
run-tests: "ON"
compare-tests: "OFF"
result-file: "changes-test-results-master-tpetra.diff"
container-options: '--user 0 --name container'
use-tpetra: "ON"
container:
image: ${{ matrix.image }}
options: ${{ matrix.container-options }}
Expand All @@ -153,6 +161,7 @@ jobs:
-D ASPECT_UNITY_BUILD=ON \
-D ASPECT_RUN_ALL_TESTS='${{ matrix.run-tests }}' \
-D ASPECT_COMPARE_TEST_RESULTS='${{ matrix.compare-tests }}' \
-D ASPECT_USE_TPETRA='${{ matrix.use-tpetra }}' \
-D CMAKE_UNITY_BUILD_BATCH_SIZE=8 \
..
ninja -j 4
Expand Down
71 changes: 47 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ endif()
# Some other ASPECT configuration options:
set(ASPECT_MAX_NUM_PARTICLE_SYSTEMS 2 CACHE STRING "The maximum number of particle systems supported at runtime.")

set(ASPECT_USE_TPETRA OFF CACHE BOOL "If ON, use Tpetra classes of Trilinos. Requires a suitable Trilinos and deal.II.")
set(ASPECT_USE_TPETRA OFF CACHE BOOL "If ON, use Tpetra packages in Trilinos. Requires a Trilinos with Tpetra support and deal.II version 9.8.0 or newer.")


# ##############################################################################
Expand Down Expand Up @@ -124,29 +124,6 @@ endif()

message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'")

if (ASPECT_USE_TPETRA)
message(STATUS "Using ASPECT_USE_TPETRA = '${ASPECT_USE_TPETRA}'")

if (NOT DEAL_II_TRILINOS_WITH_TPETRA OR NOT DEAL_II_TRILINOS_WITH_TPETRA_MUELU)
message(SEND_ERROR
"\n-- deal.II was built without support for Tpetra!\n"
)
set(_DEALII_GOOD OFF)
endif()

if (NOT ${DEAL_II_PACKAGE_VERSION} VERSION_GREATER_EQUAL 9.8.0)
message(SEND_ERROR
"\n-- Tpetra support is only available for deal.II versions greater or equal to 9.8.0!\n"
)
set(_DEALII_GOOD OFF)
endif()

message(SEND_ERROR
"\n-- Tpetra support is not yet complete. Only remove this check if you want to test Tpetra support.\n"
)
set(_DEALII_GOOD OFF)
endif()

set(_DEALII_GOOD ON)

if(NOT DEAL_II_WITH_P4EST)
Expand All @@ -163,6 +140,52 @@ if(NOT DEAL_II_WITH_TRILINOS)
set(_DEALII_GOOD OFF)
endif()

# Determine if Trilinos provides all necessary packages
if (${DEAL_II_PACKAGE_VERSION} VERSION_GREATER_EQUAL 9.8.0)
if (NOT DEAL_II_TRILINOS_WITH_TPETRA AND NOT DEAL_II_TRILINOS_WITH_EPETRA)
message(SEND_ERROR
"\n-- deal.II reports that Trilinos neither supports the Epetra nor the Tpetra stack. One of the two needs to be available!\n"
)
set(_DEALII_GOOD OFF)
endif()

# If Epetra is not available, always use Tpetra even if the user did not request it
if (NOT ASPECT_USE_TPETRA AND NOT DEAL_II_TRILINOS_WITH_EPETRA)
message(STATUS "Forcing ASPECT_USE_TPETRA=ON because Epetra support is unavailable.")
set(ASPECT_USE_TPETRA ON CACHE BOOL
"If ON, use the Tpetra packages in Trilinos. Requires a Trilinos with Tpetra support and deal.II version 9.8.0 or newer." FORCE)
endif()

# Now check if the selected package is actually available
if (ASPECT_USE_TPETRA)
if (NOT DEAL_II_TRILINOS_WITH_TPETRA OR NOT DEAL_II_TRILINOS_WITH_TPETRA_MUELU)
message(SEND_ERROR
"\n-- deal.II was built without support for Trilinos Tpetra although it is required. This is not supported. \n"
)
set(_DEALII_GOOD OFF)
endif()
else()
if (NOT DEAL_II_TRILINOS_WITH_EPETRA)
message(SEND_ERROR
"\n-- deal.II was built without support for Trilinos Epetra although it is required. This is not supported. \n"
)
set(_DEALII_GOOD OFF)
endif()
endif()

# deal.II older than 9.8.0 means we can only use Epetra, and Epetra is always
# available if DEAL_II_WITH_TRILINOS is true, which was checked above.
else()
if (ASPECT_USE_TPETRA)
message(SEND_ERROR
"\n-- Tpetra support is only available for deal.II versions greater or equal to 9.8.0!\n"
)
set(_DEALII_GOOD OFF)
endif()
endif()

message(STATUS "Using ASPECT_USE_TPETRA = '${ASPECT_USE_TPETRA}'")

if(NOT DEAL_II_WITH_SUNDIALS)
message(SEND_ERROR
"\n-- deal.II was built without support for SUNDIALS!\n"
Expand Down
9 changes: 9 additions & 0 deletions doc/modules/changes/20260526_gassmoeller
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
New: ASPECT can now use the Tpetra packages provided by
Trilinos if configured with deal.II 9.8.0 or higher.
This means ASPECT can now use Trilinos 17 for its vector,
matrix, and solver types. While accuracy and compatibility
have been confirmed, performance may deteriorate
compared to the older Epetra packages, until solver
parameters have been investigated and tuned.
<br>
(Rene Gassmoeller, 2026/05/26)
Loading