Skip to content

Commit e7d6397

Browse files
Merge branch 'develop' into feature/real-format3
2 parents 9ec1fad + 83a4c3c commit e7d6397

File tree

202 files changed

+3060
-2602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+3060
-2602
lines changed

.github/workflows/build-ci-containers-e4s.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.GITHUB_TOKEN }}
2828
- name: Build and push Docker images
29-
uses: docker/build-push-action@v6.3.0
29+
uses: docker/build-push-action@v6.7.0
3030
with:
3131
context: "./docker/sundials-ci/e4s-base"
3232
build-args: e4s_version=22.05
@@ -56,7 +56,7 @@ jobs:
5656
username: ${{ github.actor }}
5757
password: ${{ secrets.GITHUB_TOKEN }}
5858
- name: Build and push Docker images
59-
uses: docker/build-push-action@v6.3.0
59+
uses: docker/build-push-action@v6.7.0
6060
with:
6161
context: "./docker/sundials-ci/e4s-quarterly"
6262
build-args: spack_yaml=./int${{ matrix.indexsize }}-${{ matrix.precision }}/spack.yaml

.github/workflows/build-ci-containers-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
username: ${{ github.actor }}
3333
password: ${{ secrets.GITHUB_TOKEN }}
3434
- name: Build and push Docker images
35-
uses: docker/build-push-action@v6.3.0
35+
uses: docker/build-push-action@v6.7.0
3636
with:
3737
context: "./docker/sundials-ci/spack-nightly"
3838
build-args: spack_yaml=./int${{ matrix.indexsize }}-${{ matrix.precision }}/spack.yaml

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,33 @@ Volta GPUs while the automatically selected value will vary across compilers and
1212
compiler versions. As such, users are encouraged to override this value with the
1313
architecture for their system.
1414

15+
The Trilinos Teptra NVector interface has been updated to utilize CMake
16+
imported targets added in Trilinos 14 to improve support for different Kokkos
17+
backends with Trilinos. As such, Trilinos 14 or newer is required and the
18+
`Trilinos_INTERFACE_*` CMake options have been removed.
19+
20+
Example programs using *hypre* have been updated to support v2.20 and newer.
21+
22+
The build system has been updated to utilize the CMake LAPACK imported target
23+
which should ease building SUNDIALS with LAPACK libraries that require setting
24+
specific linker flags e.g., MKL.
25+
1526
### Bug Fixes
1627

28+
Fixed `ARKodeResize` not using the default `hscale` when an argument of `0` was
29+
provided.
30+
1731
Fixed the loading of ARKStep's default first order explicit method.
1832

1933
Fixed a CMake bug regarding usage of missing "print_warning" macro
2034
that was only triggered when the deprecated `CUDA_ARCH` option was used.
2135

36+
Fixed a memory leak that could occur if ``ARKodeSetDefaults`` is called
37+
repeatedly.
38+
39+
Fixed compilation errors when building the Trilinos Teptra NVector with CUDA
40+
support.
41+
2242
### Deprecation Notices
2343

2444
## Changes to SUNDIALS in release 7.1.1

benchmarks/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ sundials_option(BENCHMARK_NVECTOR BOOL "NVector benchmarks are on" ON)
2424

2525
# Disable some warnings for benchmarks
2626
if(ENABLE_ALL_WARNINGS)
27-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
28-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter")
27+
set(CMAKE_C_FLAGS
28+
"${CMAKE_C_FLAGS} -Wno-unused-parameter -Wno-unused-function")
29+
set(CMAKE_CXX_FLAGS
30+
"${CMAKE_CXX_FLAGS} -Wno-unused-parameter -Wno-unused-function")
2931
endif()
3032

3133
# ----------------------------------------

benchmarks/advection_reaction_3D/raja/backends.hpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,23 @@ using XYZ_KERNEL_POL =
114114

115115
#else
116116
#define NVECTOR_ID_STRING "Serial"
117-
using EXEC_POLICY = RAJA::seq_exec;
118-
using XYZ_KERNEL_POL = RAJA::KernelPolicy<RAJA::statement::For<
117+
118+
#if RAJA_VERSION_MAJOR < 2024
119+
using EXEC_POLICY = RAJA::seq_exec;
120+
using XYZ_KERNEL_POL = RAJA::KernelPolicy<RAJA::statement::For<
119121
2, RAJA::loop_exec,
120122
RAJA::statement::For<
121123
1, RAJA::loop_exec,
122124
RAJA::statement::For<0, RAJA::loop_exec, RAJA::statement::Lambda<0>>>>>;
125+
#else
126+
using EXEC_POLICY = RAJA::seq_exec;
127+
using XYZ_KERNEL_POL = RAJA::KernelPolicy<RAJA::statement::For<
128+
2, RAJA::seq_exec,
129+
RAJA::statement::For<
130+
1, RAJA::seq_exec,
131+
RAJA::statement::For<0, RAJA::seq_exec, RAJA::statement::Lambda<0>>>>>;
132+
#endif
133+
123134
constexpr auto LocalNvector = N_VNew_Serial;
124135
#define CopyVecFromDevice(v)
125136

cmake/SUNDIALSConfig.cmake.in

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ if("@ENABLE_KOKKOS_KERNELS@" AND NOT TARGET Kokkos::kokkoskernels)
108108
find_dependency(KokkosKernels PATHS "@KokkosKernels_DIR@")
109109
endif()
110110

111+
if("@ENABLE_LAPACK@" AND NOT TARGET LAPACK::LAPACK)
112+
# For some reason find_dependency does not find the libraries if the variables
113+
# below are internal rather than CACHE variables
114+
set(BLAS_LIBRARIES "@BLAS_LIBRARIES@" CACHE "FILEPATH" "BLAS libraries")
115+
set(BLAS_LINKER_FLAGS "@BLAS_LINKER_FLAGS@" CACHE "STRING" "BLAS linker flags")
116+
set(LAPACK_LIBRARIES "@LAPACK_LIBRARIES@" CACHE "FILEPATH" "LAPACK libraries")
117+
set(LAPACK_LINKER_FLAGS "@LAPACK_LINKER_FLAGS@" CACHE "STRING" "LAPACK linker flags")
118+
find_dependency(LAPACK)
119+
endif()
120+
111121
if("@ENABLE_PETSC@" AND NOT TARGET SUNDIALS::PETSC)
112122
add_library(SUNDIALS::PETSC INTERFACE IMPORTED)
113123
target_link_libraries(SUNDIALS::PETSC INTERFACE "@PETSC_LIBRARIES@")
@@ -161,10 +171,8 @@ if("@ENABLE_RAJA@" AND NOT TARGET RAJA)
161171
find_dependency(RAJA PATHS "@RAJA_DIR@")
162172
endif()
163173

164-
if("@ENABLE_TRILINOS@" AND NOT TARGET SUNDIALS::TRILINOS)
165-
add_library(SUNDIALS::TRILINOS INTERFACE IMPORTED)
166-
target_link_libraries(SUNDIALS::TRILINOS INTERFACE "@Trilinos_LIBRARIES@")
167-
set_target_properties(SUNDIALS::TRILINOS PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@Trilinos_INCLUDE_DIRS@")
174+
if("@ENABLE_TRILINOS@" AND NOT TARGET Tpetra::all_libs)
175+
find_dependency(Trilinos COMPONENTS Tpetra PATHS "@Trilinos_DIR@")
168176
endif()
169177

170178
if("@ENABLE_XBRAID@" AND NOT TARGET SUNDIALS::XBRAID)

cmake/SundialsBuildOptionsPost.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_RAJA")
123123
sundials_option(
124124
BUILD_NVECTOR_TRILINOS BOOL
125125
"Build the NVECTOR_TRILINOS module (requires Trilinos)" ON
126-
DEPENDS_ON ENABLE_TRILINOS Trilinos_WORKS
126+
DEPENDS_ON ENABLE_TRILINOS
127127
ADVANCED)
128128
list(APPEND SUNDIALS_BUILD_LIST "BUILD_NVECTOR_TRILINOS")
129129

@@ -244,14 +244,14 @@ list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_KOKKOSDENSE")
244244
sundials_option(
245245
BUILD_SUNLINSOL_LAPACKBAND BOOL
246246
"Build the SUNLINSOL_LAPACKBAND module (requires LAPACK)" ON
247-
DEPENDS_ON ENABLE_LAPACK LAPACK_WORKS
247+
DEPENDS_ON ENABLE_LAPACK
248248
ADVANCED)
249249
list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_LAPACKBAND")
250250

251251
sundials_option(
252252
BUILD_SUNLINSOL_LAPACKDENSE BOOL
253253
"Build the SUNLINSOL_LAPACKDENSE module (requires LAPACK)" ON
254-
DEPENDS_ON ENABLE_LAPACK LAPACK_WORKS
254+
DEPENDS_ON ENABLE_LAPACK
255255
ADVANCED)
256256
list(APPEND SUNDIALS_BUILD_LIST "BUILD_SUNLINSOL_LAPACKDENSE")
257257

cmake/SundialsSetupConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ foreach(tpl ${SUNDIALS_TPL_LIST})
6565
endforeach()
6666

6767
# prepare substitution variable SUNDIALS_TRILINOS_HAVE_MPI for sundials_config.h
68-
if(Trilinos_MPI)
68+
if(ENABLE_MPI)
6969
set(SUNDIALS_TRILINOS_HAVE_MPI TRUE)
7070
endif()
7171

cmake/SundialsTPLOptions.cmake

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -269,42 +269,6 @@ sundials_option(ENABLE_TRILINOS BOOL "Enable Trilinos support" OFF)
269269
sundials_option(Trilinos_DIR PATH "Path to root of Trilinos installation"
270270
"${Trilinos_DIR}" DEPENDS_ON ENABLE_TRILINOS)
271271

272-
sundials_option(
273-
Trilinos_INTERFACE_CXX_COMPILER STRING "C++ compiler for Trilinos interface"
274-
"${Trilinos_CXX_COMPILER}"
275-
DEPENDS_ON ENABLE_TRILINOS
276-
ADVANCED)
277-
278-
sundials_option(
279-
Trilinos_INTERFACE_C_COMPILER STRING "C compiler for Trilinos interface"
280-
"${Trilinos_C_COMPILER}"
281-
DEPENDS_ON ENABLE_TRILINOS
282-
ADVANCED)
283-
284-
sundials_option(
285-
Trilinos_INTERFACE_CXX_COMPILER_FLAGS STRING
286-
"C++ compiler flags for Trilinos interface" "${Trilinos_CXX_COMPILER_FLAGS}"
287-
DEPENDS_ON ENABLE_TRILINOS
288-
ADVANCED)
289-
290-
sundials_option(
291-
Trilinos_INTERFACE_C_COMPILER_FLAGS STRING
292-
"C compiler flags for Trilinos interface" "${Trilinos_C_COMPILER_FLAGS}"
293-
DEPENDS_ON ENABLE_TRILINOS
294-
ADVANCED)
295-
296-
sundials_option(
297-
Trilinos_INTERFACE_MPIEXEC STRING "MPI executable for Trilinos interface"
298-
"${Trilinos_MPI_EXEC}"
299-
DEPENDS_ON ENABLE_TRILINOS
300-
ADVANCED)
301-
302-
sundials_option(
303-
Trilinos_WORKS BOOL
304-
"Set to ON to force CMake to accept a given Trilinos configuration" OFF
305-
DEPENDS_ON ENABLE_TRILINOS
306-
ADVANCED)
307-
308272
# ---------------------------------------------------------------
309273
# Enable XBraid support?
310274
# ---------------------------------------------------------------

cmake/macros/SundialsAddTest.cmake

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ macro(SUNDIALS_ADD_TEST NAME EXECUTABLE)
8989
cmake_parse_arguments(SUNDIALS_ADD_TEST "${options}" "${oneValueArgs}"
9090
"${multiValueArgs}" ${ARGN})
9191

92+
# check if any options for setting command line args have been provided by
93+
# comparing them against an empty string -- this is needed to avoid missing
94+
# single args that are a false constant in CMake e.g., 0, FALSE, OFF, etc.
95+
if("${SUNDIALS_ADD_TEST_TEST_ARGS}" STREQUAL "")
96+
set(_have_test_args FALSE)
97+
else()
98+
set(_have_test_args TRUE)
99+
endif()
100+
101+
if("${SUNDIALS_ADD_TEST_EXTRA_ARGS}" STREQUAL "")
102+
set(_have_extra_test_args FALSE)
103+
else()
104+
set(_have_extra_test_args TRUE)
105+
endif()
106+
92107
# check that the test is not excluded
93108
string(TOLOWER "exclude-${SUNDIALS_PRECISION}" _exclude_precision)
94109
if(("${SUNDIALS_ADD_TEST_EXAMPLE_TYPE}" STREQUAL "exclude")
@@ -186,17 +201,17 @@ macro(SUNDIALS_ADD_TEST NAME EXECUTABLE)
186201
endif()
187202

188203
# set the test input args
189-
if(SUNDIALS_ADD_TEST_TEST_ARGS)
204+
if(_have_test_args)
190205
string(REPLACE ";" " " _user_args "${SUNDIALS_ADD_TEST_TEST_ARGS}")
191206
set(_run_args "${_user_args}")
192207
unset(_user_args)
193208
endif()
194-
if(SUNDIALS_ADD_TEST_EXTRA_ARGS)
209+
if(_have_extra_test_args)
195210
string(REPLACE ";" " " _extra_args "${SUNDIALS_ADD_TEST_EXTRA_ARGS}")
196211
set(_run_args "${_run_args} ${_extra_args}")
197212
unset(_extra_args)
198213
endif()
199-
if(_run_args)
214+
if(_have_test_args OR _have_extra_test_args)
200215
string(STRIP "${_run_args}" _run_args)
201216
list(APPEND TEST_ARGS "--runargs=\"${_run_args}\"")
202217
unset(_run_args)
@@ -214,7 +229,7 @@ macro(SUNDIALS_ADD_TEST NAME EXECUTABLE)
214229
# pass/fail
215230

216231
# convert string to list
217-
if(SUNDIALS_ADD_TEST_TEST_ARGS)
232+
if(_have_test_args)
218233
string(REPLACE " " ";" TEST_ARGS "${SUNDIALS_ADD_TEST_TEST_ARGS}")
219234
endif()
220235

0 commit comments

Comments
 (0)