Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade SUNDIALS to 7.1.1 #2513

Merged
merged 37 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0668ebd
Update SUNDIALS to 7.1.1
dweindl Sep 25, 2024
5c52b51
adapt to sundials changes
dweindl Sep 25, 2024
1b26a0a
Update
dweindl Sep 26, 2024
9285660
matlab
dweindl Sep 27, 2024
c0f6061
doc
dweindl Sep 27, 2024
3410ede
....
dweindl Sep 27, 2024
dd0b97f
..
dweindl Sep 27, 2024
b21c408
err
dweindl Sep 27, 2024
40af241
dbg
dweindl Sep 27, 2024
a714dfb
..
dweindl Sep 27, 2024
6a3cbf2
err
dweindl Sep 27, 2024
bc64433
todo
dweindl Sep 27, 2024
4b614b6
joint ss build
dweindl Sep 27, 2024
62597a4
downgrade
dweindl Sep 27, 2024
fff84fe
changed errid
dweindl Sep 28, 2024
b514135
klu via config
dweindl Sep 28, 2024
76302f4
klu via config
dweindl Sep 28, 2024
ecfd008
matlab,windows,...
dweindl Sep 28, 2024
02a8857
..
dweindl Sep 28, 2024
730065b
..
dweindl Sep 28, 2024
d2ea1a0
..
dweindl Sep 28, 2024
8eb161b
fix test
dweindl Sep 28, 2024
f3b7bec
IDASolveB
dweindl Sep 28, 2024
4b14290
more surprises?
dweindl Sep 28, 2024
523a9af
fix ctx
dweindl Sep 28, 2024
9865402
..
dweindl Sep 28, 2024
d8f55a2
..
dweindl Sep 28, 2024
7619ca8
Merge branch 'develop' into update_sundials
dweindl Sep 30, 2024
f5f462a
Merge branch 'develop' into update_sundials
dweindl Oct 1, 2024
23c8cd3
Merge branch 'develop' into update_sundials
dweindl Oct 1, 2024
c5842cd
Test https://github.com/LLNL/sundials/blob/8fdca585eed902d99df3b913f9…
dweindl Oct 2, 2024
9590335
Merge branch 'develop' into update_sundials
dweindl Oct 2, 2024
271b057
Merge branch 'develop' into update_sundials
dweindl Oct 3, 2024
fbb74ef
..
dweindl Oct 3, 2024
153a67c
Fix Oliveira_NatCommun2021 gradient check
dweindl Oct 3, 2024
13d061a
Merge branch 'develop' into update_sundials
dweindl Oct 3, 2024
878f01c
https://github.com/LLNL/sundials/blob/736369d543cb80956b1ba87377ffc0c…
dweindl Oct 3, 2024
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
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ target_compile_definitions(

target_link_libraries(
${PROJECT_NAME}
PUBLIC SUNDIALS::generic_static
SUNDIALS::nvecserial_static
PUBLIC SUNDIALS::nvecserial_static
SUNDIALS::sunmatrixband_static
SUNDIALS::sunmatrixdense_static
SUNDIALS::sunmatrixsparse_static
Expand Down
119 changes: 119 additions & 0 deletions ThirdParty/sundials/CITATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Citing SUNDIALS

We ask users of SUNDIALS to cite the following papers in any publications
reporting work done with SUNDIALS:

```bibtex
@article{gardner2022sundials,
title = {Enabling new flexibility in the {SUNDIALS} suite of nonlinear and differential/algebraic equation solvers},
author = {Gardner, David J and Reynolds, Daniel R and Woodward, Carol S and Balos, Cody J},
journal = {ACM Transactions on Mathematical Software (TOMS)},
publisher = {ACM},
volume = {48},
number = {3},
pages = {1--24},
year = {2022},
doi = {10.1145/3539801}
}
```

```bibtex
@article{hindmarsh2005sundials,
title = {{SUNDIALS}: Suite of nonlinear and differential/algebraic equation solvers},
author = {Hindmarsh, Alan C and Brown, Peter N and Grant, Keith E and Lee, Steven L and Serban, Radu and Shumaker, Dan E and Woodward, Carol S},
journal = {ACM Transactions on Mathematical Software (TOMS)},
publisher = {ACM},
volume = {31},
number = {3},
pages = {363--396},
year = {2005},
doi = {10.1145/1089014.1089020}
}
```

If any GPU features of SUNDIALS were utilized, please also cite:

```bibtex
@article{balos2021enabling,
title = {{Enabling GPU accelerated computing in the SUNDIALS time integration library}},
author = {Balos, Cody J and Gardner, David J and Woodward, Carol S and Reynolds, Daniel R},
journal = {Parallel Computing},
publisher = {Elsevier},
volume = {108},
pages = {102836},
year = {2021},
doi = {10.1016/j.parco.2021.102836}
}
```

When using the ARKODE package from SUNDIALS, please also cite:

```bibtex
@article{reynolds2023arkode,
title = {{ARKODE: A flexible IVP solver infrastructure for one-step methods}},
author = {Reynolds, Daniel R and Gardner, David J and Woodward, Carol S and Chinomona, Rujeko},
journal = {ACM Transactions on Mathematical Software},
volume = {49},
number = {2},
pages = {1--26},
year = {2023},
doi = {10.1145/3594632}
}
```

We also ask that users cite the documentation for the package and version that
they are using rather than the combined SUNDIALS online guide:

```bibtex
@Misc{arkodeDocumentation,
author = {Daniel R. Reynolds and David J. Gardner and Carol S. Woodward and Cody J. Balos},
title = {User Documentation for ARKODE},
year = {2024},
note = {v6.1.1}
}
```

```bibtex
@Misc{cvodeDocumentation,
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for CVODE},
year = {2024},
note = {v7.1.1}
}
```

```bibtex
@Misc{cvodesDocumentation,
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for CVODES},
year = {2024},
note = {v7.1.1}
}
```

```bibtex
@Misc{idaDocumentation,
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for IDA},
year = {2024},
note = {v7.1.1}
}
```

```bibtex
@Misc{idasDocumentation,
author = {Radu Serban and Cosmin Petra and Alan C. Hindmarsh and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for IDAS},
year = {2024},
note = {v6.1.1}
}
```

```bibtex
@Misc{kinsolDocumentation,
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for KINSOL},
year = {2024},
note = {v7.1.1}
}
```
108 changes: 71 additions & 37 deletions ThirdParty/sundials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# and Slaven Peles @ LLNL
# ---------------------------------------------------------------
# SUNDIALS Copyright Start
# Copyright (c) 2002-2021, Lawrence Livermore National Security
# Copyright (c) 2002-2024, Lawrence Livermore National Security
# and Southern Methodist University.
# All rights reserved.
#
Expand All @@ -19,38 +19,46 @@
# Initial setup.
# ===============================================================

cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.18)

# Address DOWNLOAD_EXTRACT_TIMESTAMP warning with CMake 3.24+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24")
cmake_policy(SET CMP0135 NEW)
endif()

# Project SUNDIALS (initially only C supported)
# sets PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR variables.
project(SUNDIALS C)

# Specify the location of additional CMAKE modules
set(CMAKE_MODULE_PATH
"${PROJECT_SOURCE_DIR}/cmake"
"${PROJECT_SOURCE_DIR}/cmake/macros"
"${PROJECT_SOURCE_DIR}/cmake/tpl"
${CMAKE_MODULE_PATH}
${PROJECT_SOURCE_DIR}/cmake
${PROJECT_SOURCE_DIR}/cmake/macros
${PROJECT_SOURCE_DIR}/cmake/tpl
)

# MACRO definitions
include(SundialsCMakeMacros)
include(FindPackageHandleStandardArgs)
include(CMakePrintHelpers)
include(CheckCSourceCompiles)
include(FindPackageHandleStandardArgs)


# Set some variables with info on the SUNDIALS project
set(PACKAGE_BUGREPORT "sundials-users@llnl.gov")
set(PACKAGE_NAME "SUNDIALS")
set(PACKAGE_STRING "SUNDIALS 5.8.0")
set(PACKAGE_STRING "SUNDIALS 7.1.1")
set(PACKAGE_TARNAME "sundials")

# Set SUNDIALS version numbers
sundials_git_version() # sets SUNDIALS_GIT_VERSION
message(STATUS "SUNDIALS_GIT_VERSION: ${SUNDIALS_GIT_VERSION}")

# (use "" for the version label if none is needed)
set(PACKAGE_VERSION_MAJOR "5")
set(PACKAGE_VERSION_MINOR "8")
set(PACKAGE_VERSION_PATCH "0")
set(PACKAGE_VERSION_MAJOR "7")
set(PACKAGE_VERSION_MINOR "1")
set(PACKAGE_VERSION_PATCH "1")
set(PACKAGE_VERSION_LABEL "")

if(PACKAGE_VERSION_LABEL)
Expand All @@ -65,38 +73,38 @@ endif()

# Specify the VERSION and SOVERSION for shared libraries

set(arkodelib_VERSION "4.8.0")
set(arkodelib_SOVERSION "4")
set(arkodelib_VERSION "6.1.1")
set(arkodelib_SOVERSION "6")

set(cvodelib_VERSION "5.8.0")
set(cvodelib_SOVERSION "5")
set(cvodelib_VERSION "7.1.1")
set(cvodelib_SOVERSION "7")

set(cvodeslib_VERSION "5.8.0")
set(cvodeslib_SOVERSION "5")
set(cvodeslib_VERSION "7.1.1")
set(cvodeslib_SOVERSION "7")

set(idalib_VERSION "5.8.0")
set(idalib_SOVERSION "5")
set(idalib_VERSION "7.1.1")
set(idalib_SOVERSION "7")

set(idaslib_VERSION "4.8.0")
set(idaslib_SOVERSION "4")
set(idaslib_VERSION "6.1.1")
set(idaslib_SOVERSION "6")

set(kinsollib_VERSION "5.8.0")
set(kinsollib_SOVERSION "5")
set(kinsollib_VERSION "7.1.1")
set(kinsollib_SOVERSION "7")

set(cpodeslib_VERSION "0.0.0")
set(cpodeslib_SOVERSION "0")

set(nveclib_VERSION "5.8.0")
set(nveclib_SOVERSION "5")
set(nveclib_VERSION "7.1.1")
set(nveclib_SOVERSION "7")

set(sunmatrixlib_VERSION "3.8.0")
set(sunmatrixlib_SOVERSION "3")
set(sunmatrixlib_VERSION "5.1.1")
set(sunmatrixlib_SOVERSION "5")

set(sunlinsollib_VERSION "3.8.0")
set(sunlinsollib_SOVERSION "3")
set(sunlinsollib_VERSION "5.1.1")
set(sunlinsollib_SOVERSION "5")

set(sunnonlinsollib_VERSION "2.8.0")
set(sunnonlinsollib_SOVERSION "2")
set(sunnonlinsollib_VERSION "4.1.1")
set(sunnonlinsollib_SOVERSION "4")

set(sundialslib_VERSION
"${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}"
Expand All @@ -109,7 +117,7 @@ set(sundialslib_SOVERSION "${PACKAGE_VERSION_MAJOR}")

# Prohibit in-source build
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
print_error("In-source build prohibited.")
message(FATAL_ERROR "In-source build prohibited.")
endif()

# Organize targets into folders when using an IDE
Expand All @@ -136,6 +144,16 @@ set(_SHARED_LIB_SUFFIX
set(_SUNDIALS_ALIAS_TARGETS ""
CACHE INTERNAL "" FORCE)

# We default to release builds
set(_DEFAULT_CMAKE_BUILD_TYPE RelWithDebInfo)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Building SUNDIALS in '${_DEFAULT_CMAKE_BUILD_TYPE}' mode as CMAKE_BUILD_TYPE was not specified.")
set(CMAKE_BUILD_TYPE "${_DEFAULT_CMAKE_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
else()
message(STATUS "Building SUNDIALS in '${CMAKE_BUILD_TYPE}' mode.")
endif()

# ===============================================================
# Build options to be processed first
# ===============================================================
Expand Down Expand Up @@ -193,6 +211,20 @@ if(_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

# Add benchmarks to the build
if(BUILD_BENCHMARKS)
add_subdirectory(benchmarks)
endif()

# Add unit tests to the build if they are enabled
if(SUNDIALS_TEST_UNITTESTS)
add_subdirectory(test/unit_tests)
endif()

if(SUNDIALS_ENABLE_EXTERNAL_ADDONS)
add_subdirectory(external)
endif()

# ===============================================================
# Install configuration header files and license file.
# ===============================================================
Expand All @@ -207,11 +239,6 @@ install(FILES "${PROJECT_BINARY_DIR}/include/sundials/sundials_config.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials"
)

# install configured header file for Fortran 90
install(FILES "${PROJECT_BINARY_DIR}/include/sundials/sundials_fconfig.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials"
)

# install shared Fortran 2003 modules
if(BUILD_FORTRAN_MODULE_INTERFACE)
# While the .mod files get generated for static and shared
Expand Down Expand Up @@ -241,7 +268,7 @@ include(CMakePackageConfigHelpers)
write_basic_package_version_file(
SUNDIALSConfigVersion.cmake
VERSION ${PACKAGE_VERSION}
COMPATIBILITY SameMajorVersion
COMPATIBILITY AnyNewerVersion
)

# install targets
Expand All @@ -262,3 +289,10 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/SUNDIALSConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/SUNDIALSConfigVersion.cmake"
DESTINATION "${SUNDIALS_INSTALL_CMAKEDIR}"
)

# Export targets so build directory can be used directly
export(
EXPORT sundials-targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/SUNDIALSTargets.cmake"
NAMESPACE SUNDIALS::
)
Loading
Loading