From 183768356a982c766c941a0b252c2ab17a8e0b25 Mon Sep 17 00:00:00 2001 From: pelesh Date: Tue, 2 Jun 2026 15:00:42 -0400 Subject: [PATCH 1/5] Add FindReSolve.cmake --- cmake/SundialsSetupTPLs.cmake | 9 ++++ cmake/SundialsTPLOptions.cmake | 22 ++++++++ cmake/tpl/FindReSolve.cmake | 96 +++++++++++++++++++++++++++++++++ cmake/tpl/SundialsReSolve.cmake | 83 ++++++++++++++++++++++++++++ 4 files changed, 210 insertions(+) create mode 100644 cmake/tpl/FindReSolve.cmake create mode 100644 cmake/tpl/SundialsReSolve.cmake diff --git a/cmake/SundialsSetupTPLs.cmake b/cmake/SundialsSetupTPLs.cmake index 44b60d26ee..ab7f7c75e5 100644 --- a/cmake/SundialsSetupTPLs.cmake +++ b/cmake/SundialsSetupTPLs.cmake @@ -170,6 +170,15 @@ if(SUNDIALS_ENABLE_RAJA) list(APPEND SUNDIALS_TPL_LIST "RAJA") endif() +# --------------------------------------------------------------- +# Find (and test) the ReSolve libraries +# --------------------------------------------------------------- + +if(SUNDIALS_ENABLE_RESOLVE) + include(SundialsReSolve) + list(APPEND SUNDIALS_TPL_LIST "RESOLVE") +endif() + # --------------------------------------------------------------- # Find (and test) the SuperLUDIST libraries # --------------------------------------------------------------- diff --git a/cmake/SundialsTPLOptions.cmake b/cmake/SundialsTPLOptions.cmake index f5c5f2360d..9ec0b61f57 100644 --- a/cmake/SundialsTPLOptions.cmake +++ b/cmake/SundialsTPLOptions.cmake @@ -547,6 +547,28 @@ sundials_option( SUNDIALS_ENABLE_KOKKOS_KERNELS BOOL "Enable Kokkos Kernels support" OFF DEPRECATED_NAMES ENABLE_KOKKOS_KERNELS) +# --------------------------------------------------------------- +# Enable ReSolve support? +# --------------------------------------------------------------- + +sundials_option(SUNDIALS_ENABLE_RESOLVE BOOL "Enable ReSolve support" OFF) + +sundials_option(ReSolve_DIR PATH + "Path to the root of a ReSolve installation" "${ReSolve_DIR}") + +sundials_option(ReSolve_INCLUDE_DIR PATH "ReSolve include directory" + "${ReSolve_INCLUDE_DIR}" ADVANCED) + +sundials_option(ReSolve_LIBRARY_DIR PATH "ReSolve library directory" + "${ReSolve_LIBRARY_DIR}" ADVANCED) + +sundials_option( + SUNDIALS_ENABLE_RESOLVE_CHECKS + BOOL + "Enable ReSolve compatibility checks" + ON + ADVANCED) + sundials_option( KokkosKernels_DIR PATH "Path to the root of a Kokkos Kernels installation" "${KokkosKernels_DIR}") diff --git a/cmake/tpl/FindReSolve.cmake b/cmake/tpl/FindReSolve.cmake new file mode 100644 index 0000000000..0cc22533e8 --- /dev/null +++ b/cmake/tpl/FindReSolve.cmake @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Programmer(s): Slaven Peles @ ORNL +# ------------------------------------------------------------------------------ +# SUNDIALS Copyright Start +# Copyright (c) 2025-2026, Lawrence Livermore National Security, +# University of Maryland Baltimore County, and the SUNDIALS contributors. +# Copyright (c) 2013-2025, Lawrence Livermore National Security +# and Southern Methodist University. +# Copyright (c) 2002-2013, Lawrence Livermore National Security. +# All rights reserved. +# +# See the top-level LICENSE and NOTICE files for details. +# +# SPDX-License-Identifier: BSD-3-Clause +# SUNDIALS Copyright End +# ------------------------------------------------------------------------------ +# ReSolve find module that creates an imported target for ReSolve. +# The target is SUNDIALS::ReSolve. +# +# The variable ReSolve_DIR can be used to control where the module +# looks for the library (path to the root of a ReSolve installation or +# to a directory containing ReSolveConfig.cmake). +# +# The variable ReSolve_INCLUDE_DIR can be used to set the include path. +# The variable ReSolve_LIBRARY_DIR can be used to set the library path. +# +# This module also defines variables, but it is best to use the defined +# target to ensure includes and compile/link options are correctly passed +# to consumers. +# +# ReSolve_FOUND - system has the ReSolve library +# ReSolve_LIBRARY - the ReSolve library +# ReSolve_INCLUDE_DIR - the ReSolve include path +# ReSolve_LIBRARIES - all libraries needed for ReSolve +# ------------------------------------------------------------------------------ + +# Prefer the upstream CMake config file if the user did not point to a specific +# include/library directory. +if(NOT (ReSolve_INCLUDE_DIR OR ReSolve_LIBRARY_DIR OR ReSolve_LIBRARY)) + + find_package(ReSolve CONFIG QUIET PATHS "${ReSolve_DIR}" + PATH_SUFFIXES lib/cmake/ReSolve cmake/ReSolve) + + if(ReSolve_FOUND AND TARGET ReSolve::ReSolve) + if(NOT TARGET SUNDIALS::ReSolve) + add_library(SUNDIALS::ReSolve ALIAS ReSolve::ReSolve) + endif() + return() + endif() + +endif() + +# Fall back to manual detection using ReSolve_DIR, ReSolve_INCLUDE_DIR, and +# ReSolve_LIBRARY_DIR. + +# Find the include directory +find_path( + ReSolve_INCLUDE_DIR resolve/SystemSolver.hpp + PATHS "${ReSolve_DIR}" + PATH_SUFFIXES include + DOC "ReSolve include directory") + +if(ReSolve_LIBRARY) + get_filename_component(ReSolve_LIBRARY_DIR "${ReSolve_LIBRARY}" PATH) + set(ReSolve_LIBRARY_DIR + "${ReSolve_LIBRARY_DIR}" + CACHE PATH "" FORCE) +else() + find_library( + ReSolve_LIBRARY resolve + PATHS "${ReSolve_DIR}" "${ReSolve_LIBRARY_DIR}" + PATH_SUFFIXES lib lib64 + DOC "ReSolve library") +endif() +mark_as_advanced(ReSolve_LIBRARY) + +set(ReSolve_LIBRARIES "${ReSolve_LIBRARY}") + +# Set package variables including ReSolve_FOUND +find_package_handle_standard_args( + ReSolve REQUIRED_VARS ReSolve_LIBRARY ReSolve_LIBRARIES ReSolve_INCLUDE_DIR) + +# Create the SUNDIALS::ReSolve imported target +if(ReSolve_FOUND) + + if(NOT TARGET SUNDIALS::ReSolve) + add_library(SUNDIALS::ReSolve UNKNOWN IMPORTED) + endif() + + set_target_properties( + SUNDIALS::ReSolve + PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${ReSolve_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "${ReSolve_LIBRARIES}" + IMPORTED_LOCATION "${ReSolve_LIBRARY}") + +endif() diff --git a/cmake/tpl/SundialsReSolve.cmake b/cmake/tpl/SundialsReSolve.cmake new file mode 100644 index 0000000000..6b152736bb --- /dev/null +++ b/cmake/tpl/SundialsReSolve.cmake @@ -0,0 +1,83 @@ +# ----------------------------------------------------------------------------- +# Programmer(s): Slaven Peles @ ORNL +# ----------------------------------------------------------------------------- +# SUNDIALS Copyright Start +# Copyright (c) 2025-2026, Lawrence Livermore National Security, +# University of Maryland Baltimore County, and the SUNDIALS contributors. +# Copyright (c) 2013-2025, Lawrence Livermore National Security +# and Southern Methodist University. +# Copyright (c) 2002-2013, Lawrence Livermore National Security. +# All rights reserved. +# +# See the top-level LICENSE and NOTICE files for details. +# +# SPDX-License-Identifier: BSD-3-Clause +# SUNDIALS Copyright End +# ----------------------------------------------------------------------------- +# Module to find and setup ReSolve. +# ReSolve is a GPU-friendly linear solver library developed at ORNL: +# https://github.com/ORNL/ReSolve +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# Section 1: Include guard +# ----------------------------------------------------------------------------- + +include_guard(GLOBAL) + +# ----------------------------------------------------------------------------- +# Section 2: Check to make sure options are compatible +# ----------------------------------------------------------------------------- + +# ReSolve requires C++14 or newer +if(CMAKE_CXX_STANDARD LESS "14") + message(FATAL_ERROR "CMAKE_CXX_STANDARD must be >= 14 when using ReSolve") +endif() + +# ----------------------------------------------------------------------------- +# Section 3: Find the TPL +# ----------------------------------------------------------------------------- + +find_package(ReSolve REQUIRED) + +message(STATUS "ReSolve_LIBRARIES: ${ReSolve_LIBRARIES}") +message(STATUS "ReSolve_INCLUDE_DIR: ${ReSolve_INCLUDE_DIR}") + +# ----------------------------------------------------------------------------- +# Section 4: Test the TPL +# ----------------------------------------------------------------------------- + +if(SUNDIALS_ENABLE_RESOLVE_CHECKS) + + message(CHECK_START "Testing ReSolve") + + set(TEST_DIR ${PROJECT_BINARY_DIR}/RESOLVE_TEST) + + file( + WRITE ${TEST_DIR}/test.cpp + "\#include \n" + "int main(void) {\n" + "ReSolve::SystemSolver solver;\n" + "return 0;\n" + "}\n") + + try_compile( + COMPILE_OK ${TEST_DIR} + ${TEST_DIR}/test.cpp + LINK_LIBRARIES SUNDIALS::ReSolve + OUTPUT_VARIABLE COMPILE_OUTPUT) + + if(COMPILE_OK) + message(CHECK_PASS "success") + else() + message(CHECK_FAIL "failed") + file(WRITE ${TEST_DIR}/compile.out "${COMPILE_OUTPUT}") + message( + FATAL_ERROR + "Could not compile ReSolve test. Check output in ${TEST_DIR}/compile.out" + ) + endif() + +else() + message(STATUS "Skipped ReSolve checks.") +endif() From 08a245370fdecb9f61a0c39644b2b81edee1d31e Mon Sep 17 00:00:00 2001 From: pelesh Date: Tue, 2 Jun 2026 15:34:16 -0400 Subject: [PATCH 2/5] Fix Re::Solve smoke test --- cmake/SundialsSetupCompilers.cmake | 3 ++- cmake/tpl/SundialsReSolve.cmake | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/cmake/SundialsSetupCompilers.cmake b/cmake/SundialsSetupCompilers.cmake index 3a82d9b841..58ffca0d6d 100644 --- a/cmake/SundialsSetupCompilers.cmake +++ b/cmake/SundialsSetupCompilers.cmake @@ -438,7 +438,8 @@ if(SUNDIALS_ENABLE_BENCHMARKS OR SUNDIALS_ENABLE_MAGMA OR SUNDIALS_ENABLE_GINKGO OR SUNDIALS_ENABLE_KOKKOS - OR SUNDIALS_ENABLE_ADIAK) + OR SUNDIALS_ENABLE_ADIAK + OR SUNDIALS_ENABLE_RESOLVE) include(SundialsSetupCXX) endif() diff --git a/cmake/tpl/SundialsReSolve.cmake b/cmake/tpl/SundialsReSolve.cmake index 6b152736bb..9c6f4b8a07 100644 --- a/cmake/tpl/SundialsReSolve.cmake +++ b/cmake/tpl/SundialsReSolve.cmake @@ -29,7 +29,15 @@ include_guard(GLOBAL) # Section 2: Check to make sure options are compatible # ----------------------------------------------------------------------------- -# ReSolve requires C++14 or newer +# ReSolve is a C++ library; CXX must be enabled (SundialsSetupCompilers.cmake +# gates include(SundialsSetupCXX) on SUNDIALS_ENABLE_RESOLVE). +if(NOT CMAKE_CXX_COMPILER_LOADED) + message( + FATAL_ERROR + "ReSolve requires C++ but no C++ compiler was found. " + "Enable a C++ compiler or set CMAKE_CXX_COMPILER.") +endif() + if(CMAKE_CXX_STANDARD LESS "14") message(FATAL_ERROR "CMAKE_CXX_STANDARD must be >= 14 when using ReSolve") endif() @@ -53,12 +61,15 @@ if(SUNDIALS_ENABLE_RESOLVE_CHECKS) set(TEST_DIR ${PROJECT_BINARY_DIR}/RESOLVE_TEST) + # Use the self-contained Common.hpp rather than SystemSolver.hpp; the latter + # has missing internal includes in some ReSolve versions. file( WRITE ${TEST_DIR}/test.cpp - "\#include \n" + "\#include \n" "int main(void) {\n" - "ReSolve::SystemSolver solver;\n" - "return 0;\n" + " ReSolve::real_type x = ReSolve::constants::ONE;\n" + " (void)x;\n" + " return 0;\n" "}\n") try_compile( From 675fae507793e1e769d7b1ee00fc5b44758b92cc Mon Sep 17 00:00:00 2001 From: pelesh Date: Tue, 2 Jun 2026 15:55:56 -0400 Subject: [PATCH 3/5] cmake formatting fixes --- cmake/SundialsTPLOptions.cmake | 12 ++++-------- cmake/tpl/FindReSolve.cmake | 16 +++++++++++++--- cmake/tpl/SundialsReSolve.cmake | 15 +++++---------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/cmake/SundialsTPLOptions.cmake b/cmake/SundialsTPLOptions.cmake index 9ec0b61f57..f84a4f540e 100644 --- a/cmake/SundialsTPLOptions.cmake +++ b/cmake/SundialsTPLOptions.cmake @@ -553,8 +553,8 @@ sundials_option( sundials_option(SUNDIALS_ENABLE_RESOLVE BOOL "Enable ReSolve support" OFF) -sundials_option(ReSolve_DIR PATH - "Path to the root of a ReSolve installation" "${ReSolve_DIR}") +sundials_option(ReSolve_DIR PATH "Path to the root of a ReSolve installation" + "${ReSolve_DIR}") sundials_option(ReSolve_INCLUDE_DIR PATH "ReSolve include directory" "${ReSolve_INCLUDE_DIR}" ADVANCED) @@ -562,12 +562,8 @@ sundials_option(ReSolve_INCLUDE_DIR PATH "ReSolve include directory" sundials_option(ReSolve_LIBRARY_DIR PATH "ReSolve library directory" "${ReSolve_LIBRARY_DIR}" ADVANCED) -sundials_option( - SUNDIALS_ENABLE_RESOLVE_CHECKS - BOOL - "Enable ReSolve compatibility checks" - ON - ADVANCED) +sundials_option(SUNDIALS_ENABLE_RESOLVE_CHECKS BOOL + "Enable ReSolve compatibility checks" ON ADVANCED) sundials_option( KokkosKernels_DIR PATH "Path to the root of a Kokkos Kernels installation" diff --git a/cmake/tpl/FindReSolve.cmake b/cmake/tpl/FindReSolve.cmake index 0cc22533e8..8fd9fc7072 100644 --- a/cmake/tpl/FindReSolve.cmake +++ b/cmake/tpl/FindReSolve.cmake @@ -36,10 +36,20 @@ # Prefer the upstream CMake config file if the user did not point to a specific # include/library directory. -if(NOT (ReSolve_INCLUDE_DIR OR ReSolve_LIBRARY_DIR OR ReSolve_LIBRARY)) +if(NOT + (ReSolve_INCLUDE_DIR + OR ReSolve_LIBRARY_DIR + OR ReSolve_LIBRARY)) - find_package(ReSolve CONFIG QUIET PATHS "${ReSolve_DIR}" - PATH_SUFFIXES lib/cmake/ReSolve cmake/ReSolve) + find_package( + ReSolve + CONFIG + QUIET + PATHS + "${ReSolve_DIR}" + PATH_SUFFIXES + lib/cmake/ReSolve + cmake/ReSolve) if(ReSolve_FOUND AND TARGET ReSolve::ReSolve) if(NOT TARGET SUNDIALS::ReSolve) diff --git a/cmake/tpl/SundialsReSolve.cmake b/cmake/tpl/SundialsReSolve.cmake index 9c6f4b8a07..04c8069ac2 100644 --- a/cmake/tpl/SundialsReSolve.cmake +++ b/cmake/tpl/SundialsReSolve.cmake @@ -32,10 +32,8 @@ include_guard(GLOBAL) # ReSolve is a C++ library; CXX must be enabled (SundialsSetupCompilers.cmake # gates include(SundialsSetupCXX) on SUNDIALS_ENABLE_RESOLVE). if(NOT CMAKE_CXX_COMPILER_LOADED) - message( - FATAL_ERROR - "ReSolve requires C++ but no C++ compiler was found. " - "Enable a C++ compiler or set CMAKE_CXX_COMPILER.") + message(FATAL_ERROR "ReSolve requires C++ but no C++ compiler was found. " + "Enable a C++ compiler or set CMAKE_CXX_COMPILER.") endif() if(CMAKE_CXX_STANDARD LESS "14") @@ -65,12 +63,9 @@ if(SUNDIALS_ENABLE_RESOLVE_CHECKS) # has missing internal includes in some ReSolve versions. file( WRITE ${TEST_DIR}/test.cpp - "\#include \n" - "int main(void) {\n" - " ReSolve::real_type x = ReSolve::constants::ONE;\n" - " (void)x;\n" - " return 0;\n" - "}\n") + "\#include \n" "int main(void) {\n" + " ReSolve::real_type x = ReSolve::constants::ONE;\n" " (void)x;\n" + " return 0;\n" "}\n") try_compile( COMPILE_OK ${TEST_DIR} From 0b67630e44b18c6d3abebf484e9146a12ea0f23f Mon Sep 17 00:00:00 2001 From: JeffZ594 Date: Wed, 3 Jun 2026 15:12:51 -0400 Subject: [PATCH 4/5] Modified the try_compile test to link ReSolve::ReSolve instead of the alias. The ReSolve tests now pass. --- cmake/SundialsTPLOptions.cmake | 28 ++++++++++++++-------------- cmake/tpl/SundialsReSolve.cmake | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmake/SundialsTPLOptions.cmake b/cmake/SundialsTPLOptions.cmake index f84a4f540e..98fe8ac331 100644 --- a/cmake/SundialsTPLOptions.cmake +++ b/cmake/SundialsTPLOptions.cmake @@ -547,6 +547,20 @@ sundials_option( SUNDIALS_ENABLE_KOKKOS_KERNELS BOOL "Enable Kokkos Kernels support" OFF DEPRECATED_NAMES ENABLE_KOKKOS_KERNELS) +sundials_option( + KokkosKernels_DIR PATH "Path to the root of a Kokkos Kernels installation" + "${KokkosKernels_DIR}") + +sundials_option( + SUNDIALS_ENABLE_KOKKOS_KERNELS_CHECKS + BOOL + "Enable Kokkos Kernels compatibility checks" + ON + ADVANCED + DEPRECATED_NAMES + KOKKOS_KERNELS_WORKS + NEGATE_DEPRECATED) + # --------------------------------------------------------------- # Enable ReSolve support? # --------------------------------------------------------------- @@ -564,17 +578,3 @@ sundials_option(ReSolve_LIBRARY_DIR PATH "ReSolve library directory" sundials_option(SUNDIALS_ENABLE_RESOLVE_CHECKS BOOL "Enable ReSolve compatibility checks" ON ADVANCED) - -sundials_option( - KokkosKernels_DIR PATH "Path to the root of a Kokkos Kernels installation" - "${KokkosKernels_DIR}") - -sundials_option( - SUNDIALS_ENABLE_KOKKOS_KERNELS_CHECKS - BOOL - "Enable Kokkos Kernels compatibility checks" - ON - ADVANCED - DEPRECATED_NAMES - KOKKOS_KERNELS_WORKS - NEGATE_DEPRECATED) diff --git a/cmake/tpl/SundialsReSolve.cmake b/cmake/tpl/SundialsReSolve.cmake index 04c8069ac2..7aded013d3 100644 --- a/cmake/tpl/SundialsReSolve.cmake +++ b/cmake/tpl/SundialsReSolve.cmake @@ -70,7 +70,7 @@ if(SUNDIALS_ENABLE_RESOLVE_CHECKS) try_compile( COMPILE_OK ${TEST_DIR} ${TEST_DIR}/test.cpp - LINK_LIBRARIES SUNDIALS::ReSolve + LINK_LIBRARIES ReSolve::ReSolve OUTPUT_VARIABLE COMPILE_OUTPUT) if(COMPILE_OK) From 3078b644b83aa9a75ef0225e93042129c3930be2 Mon Sep 17 00:00:00 2001 From: pelesh Date: Wed, 3 Jun 2026 16:52:09 -0400 Subject: [PATCH 5/5] Add Re::Solve build to the CI pipeline --- .github/hubcast.yml | 46 ++++++++++--------- .../spack-nightly/int32-double/spack.yaml | 1 + .../spack-nightly/int64-double/spack.yaml | 1 + test/config_cmake.py | 24 ++++++++++ test/env/docker.sh | 12 +++++ 5 files changed, 63 insertions(+), 21 deletions(-) diff --git a/.github/hubcast.yml b/.github/hubcast.yml index bf7f35e28f..8989f9e6e8 100644 --- a/.github/hubcast.yml +++ b/.github/hubcast.yml @@ -1,21 +1,25 @@ -Repo: - # Required: organization or user that owns the repo on CZ GitLab - dest_org: sundials - - # Required: name of the destination repository on CZ GitLab - dest_name: sundials - - # Optional: name of the CI check as reported back to GitHub (default: gitlab-ci) - check_name: llnl-lc-gitlab-ci - - # Optional: granularity of CI statuses reported to GitHub (default: [pipeline]) - # Set to [pipeline] for overall pipeline status only - # Set to [jobs] for individual job statuses only - # Set to [pipeline, jobs] to report both - check_types: [pipeline, jobs] - - # Optional: delete branches from destination when source PR is closed (default: true) - delete_closed: true - - # Optional: sync draft PRs/MRs (default: true) - sync_drafts: true +# Hubcast configuration is disabled; CI runs on GitHub-hosted resources only. +# To re-enable mirroring to LLNL CZ GitLab (and the llnl-lc-gitlab-ci checks +# on LLNL clusters), uncomment the block below. +# +# Repo: +# # Required: organization or user that owns the repo on CZ GitLab +# dest_org: sundials +# +# # Required: name of the destination repository on CZ GitLab +# dest_name: sundials +# +# # Optional: name of the CI check as reported back to GitHub (default: gitlab-ci) +# check_name: llnl-lc-gitlab-ci +# +# # Optional: granularity of CI statuses reported to GitHub (default: [pipeline]) +# # Set to [pipeline] for overall pipeline status only +# # Set to [jobs] for individual job statuses only +# # Set to [pipeline, jobs] to report both +# check_types: [pipeline, jobs] +# +# # Optional: delete branches from destination when source PR is closed (default: true) +# delete_closed: true +# +# # Optional: sync draft PRs/MRs (default: true) +# sync_drafts: true diff --git a/docker/sundials-ci/spack-nightly/int32-double/spack.yaml b/docker/sundials-ci/spack-nightly/int32-double/spack.yaml index 4291a71a27..cbb78c8e50 100644 --- a/docker/sundials-ci/spack-nightly/int32-double/spack.yaml +++ b/docker/sundials-ci/spack-nightly/int32-double/spack.yaml @@ -20,6 +20,7 @@ spack: - superlu-dist~int64 ^parmetis~int64 arch=x86_64 %gcc@9.4.0 - trilinos+tpetra gotype=int arch=x86_64 %gcc@9.4.0 - xbraid arch=x86_64 %gcc@9.4.0 + - resolve~cuda~rocm arch=x86_64 %gcc@9.4.0 config: install_tree: /opt/software mirrors: diff --git a/docker/sundials-ci/spack-nightly/int64-double/spack.yaml b/docker/sundials-ci/spack-nightly/int64-double/spack.yaml index 2e0f859aa6..50b380d64b 100644 --- a/docker/sundials-ci/spack-nightly/int64-double/spack.yaml +++ b/docker/sundials-ci/spack-nightly/int64-double/spack.yaml @@ -20,6 +20,7 @@ spack: - superlu-dist+int64 ^parmetis+int64 ^netlib-lapack arch=x86_64 %gcc@9.4.0 - trilinos+tpetra gotype=long_long arch=x86_64 %gcc@9.4.0 - xbraid arch=x86_64 %gcc@9.4.0 + - resolve~cuda~rocm arch=x86_64 %gcc@9.4.0 config: install_tree: /opt/software mirrors: diff --git a/test/config_cmake.py b/test/config_cmake.py index a208260299..bb02013388 100644 --- a/test/config_cmake.py +++ b/test/config_cmake.py @@ -1156,6 +1156,30 @@ def main(): dependson="--xbraid", ) + # ReSolve + group = parser.add_argument_group("ReSolve Options") + + add_arg( + group, + "--resolve", + "SUNDIALS_RESOLVE", + "SUNDIALS_ENABLE_RESOLVE", + "OFF", + "BOOL", + "SUNDIALS ReSolve support", + ) + + add_arg( + group, + "--resolve-dir", + "RESOLVE_ROOT", + "ReSolve_DIR", + None, + "PATH", + "ReSolve install directory", + dependson="--resolve", + ) + # -------- # Testing # -------- diff --git a/test/env/docker.sh b/test/env/docker.sh index b26abc1cd1..88080b8a8d 100644 --- a/test/env/docker.sh +++ b/test/env/docker.sh @@ -360,3 +360,15 @@ else export SUNDIALS_XBRAID=OFF unset XBRAID_ROOT fi + +# ------- +# resolve +# ------- + +if [ "$SUNDIALS_PRECISION" == "double" ]; then + export SUNDIALS_RESOLVE=ON + export RESOLVE_ROOT=/opt/view +else + export SUNDIALS_RESOLVE=OFF + unset RESOLVE_ROOT +fi