diff --git a/.github/workflows/check-clang-format.yml b/.github/workflows/check-clang-format.yml index 7d5feae1cf..8da2ebd3f9 100644 --- a/.github/workflows/check-clang-format.yml +++ b/.github/workflows/check-clang-format.yml @@ -12,7 +12,7 @@ jobs: image: ghcr.io/llnl/sundials_spack_cache:llvm-17.0.4-h4lflucc3v2vage45opbo2didtcuigsn.spack steps: - name: Install git - run: | + run: | apt update apt install -y git @@ -26,18 +26,18 @@ jobs: - name: Print clang-format version run: clang-format --version - + - name: Run checker on code run: | - ./scripts/format.sh . - + ./scripts/format.sh benchmarks examples include src test + - name: Run git diff to see if anything changed run: /usr/bin/git diff --name-only --exit-code - + - name: Run git diff if we failed if: failure() run: /usr/bin/git diff > diff - + - name: Archive diff if we failed uses: actions/upload-artifact@v3 if: failure() diff --git a/.gitmodules b/.gitmodules index f12a7cce09..659855b75f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "test/answers"] path = test/answers url = https://github.com/sundials-codes/answers.git +[submodule "external/sundials-addon-example"] + path = external/sundials-addon-example + url = https://github.com/sundials-codes/sundials-addon-example.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d1f5716a3..59ffc7a35d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,36 @@ ## Changes to SUNDIALS in release X.Y.Z +Created shared user interface for ARKODE user-callable routines, to allow more +uniform control over time-stepping algorithms, improved extensibility, and +simplified code maintenance. Marked the corresponding stepper-specific +user-callable routines as deprecated; these will be removed in a future major +release. + +Added "Resize" capability, as well as missing `SetRootDirection` and +`SetNoInactiveRootWarn` functions, to ARKODE's SPRKStep time-stepping module. + +Deprecated `ARKStepSetOptimalParams` function; added instructions to user guide +for users who wish to retain the current functionality. + +Added the following Runge-Kutta Butcher tables +* `ARKODE_FORWARD_EULER_1_1` +* `ARKODE_RALSTON_EULER_2_1_2` +* `ARKODE_EXPLICIT_MIDPOINT_EULER_2_1_2` +* `ARKODE_BACKWARD_EULER_1_1` +* `ARKODE_IMPLICIT_MIDPOINT_1_2` +* `ARKODE_IMPLICIT_TRAPEZOIDAL_2_2` + +Added the following MRI coupling tables +* `ARKODE_MRI_GARK_FORWARD_EULER` +* `ARKODE_MRI_GARK_RALSTON2` +* `ARKODE_MRI_GARK_RALSTON3` +* `ARKODE_MRI_GARK_BACKWARD_EULER` +* `ARKODE_MRI_GARK_IMPLICIT_MIDPOINT` +* `ARKODE_IMEX_MRI_GARK_EULER` +* `ARKODE_IMEX_MRI_GARK_TRAPEZOIDAL` +* `ARKODE_IMEX_MRI_GARK_MIDPOINT` + Updated the CMake variable `HIP_PLATFORM` default to `amd` as the previous default, `hcc`, is no longer recognized in ROCm 5.7.0 or newer. The new default is also valid in older version of ROCm (at least back to version 4.3.1). @@ -9,6 +39,32 @@ is also valid in older version of ROCm (at least back to version 4.3.1). Fixed a bug in the HIP execution policies where `WARP_SIZE` would not be set with ROCm 6.0.0 or newer. +Changed the CMake version compatibility mode for SUNDIALS to `AnyNewerVersion` +instead of `SameMajorVersion`. This fixes the issue seen +[here](https://github.com/AMReX-Codes/amrex/pull/3835). + +Fixed a bug in some Fortran examples where `c_null_ptr` was passed as an argument +to a function pointer instead of `c_null_funptr`. This caused compilation issues +with the Cray Fortran compiler. + +Fixed a bug where `MRIStepEvolve` would not handle a recoverable error produced +from evolving the inner stepper. + +Added CMake infrastructure that enables externally maintained addons/plugins +to be *optionally* built with SUNDIALS. See the [Contributing Guide](./CONTRIBUTING.md) +for more details. + +Added support for Kokkos Kernels v4. + +Fixed a bug that caused error messages to be cut off in some cases. Fixes [GitHub Issue #461](https://github.com/LLNL/sundials/issues/461). + +Fixed a memory leak when an error handler was added to a `SUNContext`. Fixes [GitHub Issue #466](https://github.com/LLNL/sundials/issues/466). + +Fixed a CMake bug that caused an MPI linking error for our C++ examples in some instances. Fixes [GitHub Issue #464](https://github.com/LLNL/sundials/issues/464). + +Fixed a bug in `ARKodeSPRKTable_Create` where the coefficient arrays where not +allocated. + ## Changes to SUNDIALS in release v7.0.0 ### Major Feature diff --git a/CMakeLists.txt b/CMakeLists.txt index dc07466ff4..9c2279f4e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,6 +221,10 @@ 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. # =============================================================== @@ -264,7 +268,7 @@ include(CMakePackageConfigHelpers) write_basic_package_version_file( SUNDIALSConfigVersion.cmake VERSION ${PACKAGE_VERSION} - COMPATIBILITY SameMajorVersion + COMPATIBILITY AnyNewerVersion ) # install targets diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ea2f6f9c6..4106e3738b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,16 @@ # Contributing to SUNDIALS -At this time, the SUNDIALS team does not have the resources to review and take -in large additions to the code or significant new features. Contributions -addressing bug fixes or minor changes are preferred via a pull request to the -[SUNDIALS GitHub repository](https://github.com/LLNL/sundials). +There are two primary ways of contributing to SUNDIALS. The first way is by particpating +in the development of SUNDIALS directly through contributions of code to the primary +[SUNDIALS repository](https://github.com/LLNL/sundials). This is the best way to contribute +bug fixes and minor improvements. At this time, the SUNDIALS team does not have the resources +to review and take in large additions to the code or significant new features. +Larger additions can be contributed as a SUNDIALS "addon" which is a component that may be +optionally downloaded by users and then compiled and installed with SUNDIALS. + +## Direct Contributions via Pull Requests + +Direct contributions to SUNDIALS are made by opening a Pull Request. All new contributions to SUNDIALS must be made under the BSD 3-clause license. See the [LICENSE](./LICENSE) and [NOTICE](./NOTICE) files for details. The @@ -62,12 +69,11 @@ By making a contribution to this project, I certify that: this project or the open source license(s) involved. ``` -As discussed in the [Docker software project blog](https://blog.docker.com/2014/01/docker-code-contributions-require-developer-certificate-of-origin/) -this DCO "lets us know that you are entitled to contribute this code to -[SUNDIALS] and that you are willing to have it used in distributions and -derivative works." +The DCO lets us know that you are entitled to contribute this code to +SUNDIALS and that you are willing to have it used in distributions and +derivative works. -"By including the DCO signature, you are stating that one or +By including the DCO signature, you are stating that one or more of the following is true of your contribution: 1. You created this contribution/change and have the right to submit it @@ -77,7 +83,7 @@ more of the following is true of your contribution: 3. This contribution/change has been provided to you by someone who did 1 or 2 and you are submitting the contribution unchanged. 4. You understand this contribution is public and may be redistributed as - open source software" under the BSD license. + open source software under the BSD license. All commits submitted to the SUNDIALS project need to have the following sign off line in the commit message: @@ -89,3 +95,31 @@ Replacing Jane Doe’s details with your name and email address. If you've set `user.name` and `user.email` in your Git configuration, you can automatically add a sign off line at the end of the commit message by using the `-s` option (e.g., `git commit -s`). + +## Contributions via SUNDIALS Addons + +SUNDIALS "addons" are community developed code additions for SUNDIALS that can be subsumed by the +SUNDIALS build system so that they have full access to all internal SUNDIALS symbols. +The intent is for SUNDIALS addons to function as if they are part of the SUNDIALS library, +while allowing them to potentially have different licenses +(although we encourage BSD-3-Clause still), code style +(although we encourage them to follow the SUNDIALS style outlined :ref:`here