What’s New in SUNDIALS?
Changes to SUNDIALS in release v7.0.0
Major Feature
SUNDIALS now has more robust and uniform error handling. Non-release builds will be built with additional error checking by default. See the Error Checking section in the user guide for details.
Breaking Changes
Minimum C Standard
SUNDIALS now requires using a compiler that supports a subset of the C99 standard. Note with the Microsoft C/C++ compiler the subset of C99 features utilized by SUNDIALS are available starting with Visual Studio 2015.
Deprecated Types and Functions Removed
The previously deprecated types realtype
and booleantype
were removed from sundials_types.h
and replaced with sunrealtype
and sunbooleantype
. The deprecated names for these types can be used by including the header file sundials_types_deprecated.h
but will be fully removed in the next major release. Functions, types and header files that were previously deprecated have also been removed.
Error Handling Changes
With the addition of the new error handling capability, the *SetErrHandlerFn
and *SetErrFile
functions in CVODE(S), IDA(S), ARKODE, and KINSOL have been removed. Users of these functions can use the functions SUNContext_PushErrHandler
, and SUNLogger_SetErrorFilename
instead. For further details see the Error Checking and Logging sections in the documentation.
In addition the following names/symbols were replaced by SUN_ERR_*
codes:
Removed | Replaced with SUNErrCode |
---|---|
SUNLS_SUCCESS | SUN_SUCCESS |
SUNLS_UNRECOV_FAILURE | no replacement (value was unused) |
SUNLS_MEM_NULL | SUN_ERR_ARG_CORRUPT |
SUNLS_ILL_INPUT | SUN_ERR_ARG_* |
SUNLS_MEM_FAIL | SUN_ERR_MEM_FAIL |
SUNLS_PACKAGE_FAIL_UNREC | SUN_ERR_EXT_FAIL |
SUNLS_VECTOROP_ERR | SUN_ERR_OP_FAIL |
SUN_NLS_SUCCESS | SUN_SUCCESS |
SUN_NLS_MEM_NULL | SUN_ERR_ARG_CORRUPT |
SUN_NLS_MEM_FAIL | SUN_ERR_MEM_FAIL |
SUN_NLS_ILL_INPUT | SUN_ERR_ARG_* |
SUN_NLS_VECTOROP_ERR | SUN_ERR_OP_FAIL |
SUN_NLS_EXT_FAIL | SUN_ERR_EXT_FAIL |
SUNMAT_SUCCESS | SUN_SUCCESS |
SUNMAT_ILL_INPUT | SUN_ERR_ARG_* |
SUNMAT_MEM_FAIL | SUN_ERR_MEM_FAIL |
SUNMAT_OPERATION_FAIL | SUN_ERR_OP_FAIL |
SUNMAT_MATVEC_SETUP_REQUIRED | SUN_ERR_OP_FAIL |
The following functions have had their signature updated to ensure they can leverage the new SUNDIALS error handling capabilities.
// From sundials_futils.h
SUNDIALSFileOpen
SUNDIALSFileClose
// From sundials_memory.h
SUNMemorNewEmpty
SUNMemoryHelper_Alias
SUNMemoryHelper_Wrap
// From sundials_nvector.h
N_VNewVectorArray
SUNComm Type Added
We have replaced the use of a type-erased (i.e., void*
) pointer to a communicator in place of MPI_Comm
throughout the SUNDIALS API with a SUNComm
, which is just a typedef to an int
in builds without MPI and a typedef to a MPI_Comm
in builds with MPI. As a result:
All users will need to update their codes because the call to
SUNContext_Create
now takes aSUNComm
instead of type-erased pointer to a communicator. For non-MPI codes, passSUN_COMM_NULL
to thecomm
argument instead ofNULL
. For MPI codes, pass theMPI_Comm
directly.The same change must be made for calls to
SUNLogger_Create
orSUNProfiler_Create
.Some users will need to update their calls to
N_VGetCommunicator
, and update any customN_Vector
implementations that provideN_VGetCommunicator
, since it now returns aSUNComm
.
The change away from type-erased pointers for SUNComm
fixes problems like the one described in GitHub Issue #275.
The SUNLogger is now always MPI-aware if MPI is enabled in SUNDIALS and the SUNDIALS_LOGGING_ENABLE_MPI
CMake option and macro definition were removed accordingly.
SUNDIALS Core Library
Users now need to link to sundials_core
in addition to the libraries already linked to. This will be picked up automatically in projects that use the SUNDIALS CMake target. The library sundials_generic
has been superseded by sundials_core
and is no longer available. This fixes some duplicate symbol errors on Windows when linking to multiple SUNDIALS libraries.
Fortran Interface Modules Streamlined
We have streamlined the Fortran modules that need to be included by users by combining the SUNDIALS core into one Fortran module, fsundials_core_mod
. Modules for implementations of the core APIs still exist (e.g., for the Dense linear solver there is fsunlinsol_dense_mod
) as do the modules for the SUNDIALS packages (e.g., fcvode_mod
). The following modules are the ones that have been consolidated into fsundials_core_mod
:
fsundials_adaptcontroller_mod
fsundials_context_mod
fsundials_futils_mod
fsundials_linearsolver_mod
fsundials_logger_mod
fsundials_matrix_mod
fsundials_nonlinearsolver_mod
fsundials_nvector_mod
fsundials_profiler_mod
fsundials_types_mod
Deprecation notice
The functions in sundials_math.h
will be deprecated in the next release.
sunrealtype SUNRpowerI(sunrealtype base, int exponent);
sunrealtype SUNRpowerR(sunrealtype base, sunrealtype exponent);
sunbooleantype SUNRCompare(sunrealtype a, sunrealtype b);
sunbooleantype SUNRCompareTol(sunrealtype a, sunrealtype b, sunrealtype tol);
sunrealtype SUNStrToReal(const char* str);
Additionally, the following header files (and everything in them) will be
deprecated -- users who rely on these are recommended to transition to the
corresponding SUNMatrix
and SUNLinearSolver
modules:
sundials_direct.h
sundials_dense.h
sundials_band.h
Minor Changes
Fixed #329 so that C++20 aggregate initialization can be used.
Fixed integer overflow in the internal SUNDIALS hashmap. This resolves #409 and #249.
The CMAKE_BUILD_TYPE
defaults to RelWithDebInfo
mode now i.e., SUNDIALS will be built with optimizations and debugging symbols enabled by default. Previously the build type was unset by default so no optimization or debugging flags were set.
The advanced CMake options to override the inferred LAPACK name-mangling scheme have been updated from SUNDIALS_F77_FUNC_CASE
and SUNDIALS_F77_FUNC_UNDERSCORES
to SUNDIALS_LAPACK_CASE
and SUNDIALS_LAPACK_UNDERSCORES
, respectively.
Converted most previous Fortran 77 and 90 examples to use SUNDIALS' Fortran 2003 interface.
Changes to SUNDIALS in release v6.7.0
Added the SUNAdaptController
base class, ported ARKODE's internal implementations of time step controllers into implementations of this class, and updated ARKODE to use these objects instead of its own implementations. Added ARKStepSetAdaptController
and ERKStepSetAdaptController
routines so that users can modify controller parameters, or even provide custom implementations.
Added the routines ARKStepSetAdaptivityAdjustment
and ERKStepSetAdaptivityAdjustment
, that allow users to adjust the value for the method order supplied to the temporal adaptivity controllers. The ARKODE default for this adjustment has been -1 since its initial release, but for some applications a value of 0 is more appropriate. Users who notice that their simulations encounter a large number of temporal error test failures may want to experiment with adjusting this value.
Added the third order ERK method ARKODE_SHU_OSHER_3_2_3
, the fourth order ERK method ARKODE_SOFRONIOU_SPALETTA_5_3_4
, the sixth order ERK method ARKODE_VERNER_9_5_6
, the seventh order ERK method ARKODE_VERNER_10_6_7
, the eighth order ERK method ARKODE_VERNER_13_7_8
, and the ninth order ERK method ARKODE_VERNER_16_8_9
.
ARKStep, ERKStep, MRIStep, and SPRKStep were updated to remove a potentially unnecessary right-hand side evaluation at the end of an integration. ARKStep was additionally updated to remove extra right-hand side evaluations when using an explicit method or an implicit method with an explicit first stage.
Improved computational complexity of SUNMatScaleAddI_Sparse
from O(M*N)
to O(NNZ)
.
Added Fortran support for the LAPACK dense SUNLinearSolver
implementation.
Fixed a regression introduced by the stop time bug fix in v6.6.1 where ARKODE, CVODE, CVODES, IDA, and IDAS would return at the stop time rather than the requested output time if the stop time was reached in the same step in which the output time was passed.
Fixed a bug in ERKStep where methods with c[s-1] = 1
but a[s-1,j] != b[j]
were incorrectly treated as having the first same as last (FSAL) property.
Fixed a bug in ARKODE where ARKStepSetInterpolateStopTime
would return an interpolated solution at the stop time in some cases when interpolation was disabled.
Fixed a bug in ARKStepSetTableNum
wherein it did not recognize ARKODE_ARK2_ERK_3_1_2
and ARKODE_ARK2_DIRK_3_1_2
as a valid additive Runge-Kutta Butcher table pair.
Fixed a bug in MRIStepCoupling_Write
where explicit coupling tables were not written to the output file pointer.
The MRIStepInnerStepper
class in MRIStep was updated to make supplying an MRIStepInnerFullRhsFn
optional.
Fixed scaling bug in SUNMatScaleAddI_Sparse
for non-square matrices.
Changed the SUNProfiler
so that it does not rely on MPI_WTime
in any case. This fixes GitHub Issue #312.
Fixed missing soversions in some SUNLinearSolver
and SUNNonlinearSolver
CMake targets.
Renamed some internal types in CVODES and IDAS to allow both packages to be built together in the same binary.
Changes to SUNDIALS in release v6.6.2
Fixed the build system support for MAGMA when using a NVIDIA HPC SDK installation of CUDA and fixed the targets used for rocBLAS and rocSPARSE.
Changes to SUNDIALS in release v6.6.1
Updated the Tpetra NVector interface to support Trilinos 14.
Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper object.
Fixed a bug in ARKODE, CVODE, CVODES, IDA, and IDAS where the stop time may not be cleared when using normal mode if the requested output time is the same as the stop time. Additionally, with ARKODE, CVODE, and CVODES this fix removes an unnecessary interpolation of the solution at the stop time that could occur in this case.
Changes to SUNDIALS in release v6.6.0
A new time-stepping module, SPRKStep
, was added to ARKODE. This time-stepper provides explicit symplectic partitioned Runge-Kutta methods up to order 10 for separable Hamiltonian systems.
Added support for relaxation Runge-Kutta methods to ERKStep and ARKStep in ARKODE.
Added the second order IMEX method from Giraldo, Kelly, and Constantinescu 2013 as the default second order IMEX method in ARKStep. The explicit table is given by ARKODE_ARK2_ERK_3_1_2
and the implicit table by ARKODE_ARK2_DIRK_3_1_2
.
Updated CVODE, CVODES and ARKODE default behavior when returning the solution when the internal time has reached a user-specified stop time. Previously, the output solution was interpolated to the value of tstop
; the default is now to copy the internal solution vector. Users who wish to revert to interpolation may call a new routine CVodeSetInterpolateStopTime
, ARKStepSetInterpolateStopTime
, ERKStepSetInterpolateStopTime
, or MRIStepSetInterpolateStopTime
.
A potential bug was fixed when using inequality constraint handling and calling ARKStepGetEstLocalErrors
or ERKStepGetEstLocalErrors
after a failed step in which an inequality constraint violation occurred. In this case, the values returned by ARKStepGetEstLocalErrors
or ERKStepGetEstLocalErrors
may have been invalid.
Updated the F2003 utility routines SUNDIALSFileOpen
and SUNDIALSFileClose
to support user specification of stdout
and stderr
strings for the output file names.
Changes to SUNDIALS in release v6.5.1
Added the functions ARKStepClearStopTime
, ERKStepClearStopTime
, MRIStepClearStopTime
, CVodeClearStopTime
, and IDAClearStopTime
to disable a previously set stop time.
The default interpolant in ARKODE when using a first order method has been updated to a linear interpolant to ensure values obtained by the integrator are returned at the ends of the time interval. To restore the previous behavior of using a constant interpolant call ARKStepSetInterpolantDegree
, ERKStepSetInterpolantDegree
, or MRIStepSetInterpolantDegree
and set the interpolant degree to zero before evolving the problem.
Fixed build errors when using SuperLU_DIST with ROCM enabled to target AMD GPUs.
Fixed compilation errors in some SYCL examples when using the icx
compiler.
Changes to SUNDIALS in release v6.5.0
A new capability to keep track of memory allocations made through the SUNMemoryHelper
classes has been added. Memory allocation stats can be accessed through the SUNMemoryHelper_GetAllocStats
function. See the documentation for the SUNMemoryHelper
classes for more details.
Added the functions ARKStepGetJac
, ARKStepGetJacTime
, ARKStepGetJacNumSteps
, MRIStepGetJac
, MRIStepGetJacTime
, MRIStepGetJacNumSteps
, CVodeGetJac
, CVodeGetJacTime
, CVodeGetJacNumSteps
, IDAGetJac
, IDAGetJacCj
, IDAGetJacTime
, IDAGetJacNumSteps
, KINGetJac
, KINGetJacNumIters
to assist in debugging simulations utilizing a matrix-based linear solver.
Added support for CUDA 12.
Added support for the SYCL backend with RAJA 2022.x.y.
Fixed an underflow bug during root finding in ARKODE, CVODE, CVODES, IDA and IDAS.
Fixed an issue with finding oneMKL when using the icpx
compiler with the -fsycl
flag as the C++ compiler instead of dpcpp
.
Fixed the shape of the arrays returned by FN_VGetArrayPointer
functions as well as the FSUNDenseMatrix_Data
, FSUNBandMatrix_Data
, FSUNSparseMatrix_Data
, FSUNSparseMatrix_IndexValues
, and FSUNSparseMatrix_IndexPointers
functions. Compiling and running code that uses the SUNDIALS Fortran interfaces with bounds checking will now work.
Fixed an implicit conversion error in the Butcher table for ESDIRK5(4)7L[2]SA2.
Changes to SUNDIALS in release v6.4.1
Fixed a bug with the Kokkos interfaces that would arise when using clang.
Fixed a compilation error with the Intel oneAPI 2022.2 Fortran compiler in the
Fortran 2003 interface test for the serial N_Vector
.
Fixed a bug in the SUNLINSOL_LAPACKBAND and SUNLINSOL_LAPACKDENSE modules
which would cause the tests to fail on some platforms.
Changes to SUNDIALS in release v6.4.0
CMake 3.18.0 or newer is now required for CUDA support.
A C++14 compliant compiler is now required for C++ based features and examples
e.g., CUDA, HIP, RAJA, Trilinos, SuperLU_DIST, MAGMA, GINKGO, and KOKKOS.
Added support for GPU enabled SuperLU_DIST and SuperLU_DIST v8.x.x. Removed
support for SuperLU_DIST v6.x.x or older. Fix mismatched definition and
declaration bug in SuperLU_DIST matrix constructor.
Added support for the Ginkgo linear algebra
library. This support includes new SUNMatrix
and SUNLinearSolver
implementations, see the SUNMATRIX_GINKGO
and SUNLINEARSOLVER_GINKGO
sections in the documentation for more information.
Added new NVector
, dense SUNMatrix
, and dense SUNLinearSolver
implementations utilizing Kokkos Ecosystem for
performance portability, see the NVECTOR_KOKKOS
, SUNMATRIX_KOKKOSDENSE
andSUNLINEARSOLVER_KOKKOSDENSE
sections in the documentation for more
information.
Added the functions ARKStepSetTableName
, ERKStepSetTableName
,MRIStepCoupling_LoadTableByName
, ARKodeButcherTable_LoadDIRKByName
, andARKodeButcherTable_LoadERKByName
to load a table from a string.
Fixed a bug in the CUDA and HIP vectors where N_VMaxNorm
would return the
minimum positive floating-point value for the zero vector.
Fixed memory leaks/out of bounds memory accesses in the ARKODE MRIStep module
that could occur when attaching a coupling table after reinitialization with a
different number of stages than originally selected.
Fixed a memory leak in CVODE and CVODES where the projection memory would not be
deallocated when calling CVodeFree
.
Changes to SUNDIALS in release v6.3.0
Added GetUserData
functions in each package to retrieve the user data pointer
provided to SetUserData
functions. See ARKStepGetUserData
,ERKStepGetUserData
, MRIStepGetUserData
, CVodeGetUserData
,IDAGetUserData
, or KINGetUserData
for more information.
Fixed a bug in ERKStepReset
, ERKStepReInit
, ARKStepReset
, ARKStepReInit
,MRIStepReset
, and MRIStepReInit
where a previously-set value of tstop (from
a call to ERKStepSetStopTime
, ARKStepSetStopTime
, or MRIStepSetStopTime
,
respectively) would not be cleared.
Updated MRIStepReset
to call the corresponding MRIStepInnerResetFn
with the same
(tR,yR) arguments for the MRIStepInnerStepper
object that is used to evolve the
MRI "fast" time scale subproblems.
Added a new example which demonstrates using CVODE with a discontinuous right-hand-side function and rootfinding.
Added a variety of embedded DIRK methods from [Kennedy & Carpenter,
NASA TM-2016-219173, 2016] and [Kennedy & Carpenter, Appl. Numer. Math., 146, 2019] to
ARKODE.
Fixed the unintuitive behavior of the USE_GENERIC_MATH
CMake option which
caused the double precision math functions to be used regardless of the value ofSUNDIALS_PRECISION
. Now, SUNDIALS will use precision appropriate math
functions when they are available and the user may provide the math library to
link to via the advanced CMake option SUNDIALS_MATH_LIBRARY
.
Changed SUNDIALS_LOGGING_ENABLE_MPI
CMake option default to be 'OFF'.
Changes to SUNDIALS in release v6.2.0
https://github.com/LLNL/sundials is now the official SUNDIALS development repository.
Added the SUNLogger
API which provides a SUNDIALS-wide
mechanism for logging of errors, warnings, informational output,
and debugging output.
Deprecated the following functions, it is recommended to use the SUNLogger
API
instead.
ARKStepSetDiagnostics
ERKStepSetDiagnostics
MRIStepSetDiagnostics
KINSetInfoFile
SUNNonlinSolSetPrintLevel_Newton
SUNNonlinSolSetInfoFile_Newton
SUNNonlinSolSetPrintLevel_FixedPoint
SUNNonlinSolSetInfoFile_FixedPoint
SUNLinSolSetInfoFile_PCG
SUNLinSolSetPrintLevel_PCG
SUNLinSolSetInfoFile_SPGMR
SUNLinSolSetPrintLevel_SPGMR
SUNLinSolSetInfoFile_SPFGMR
SUNLinSolSetPrintLevel_SPFGMR
SUNLinSolSetInfoFile_SPTFQM
SUNLinSolSetPrintLevel_SPTFQMR
SUNLinSolSetInfoFile_SPBCGS
SUNLinSolSetPrintLevel_SPBCGS
The SUNLinSolSetInfoFile_**
and SUNNonlinSolSetInfoFile_*
family of
functions are now enabled by setting the CMake option SUNDIALS_LOGGING_LEVEL
to a value >= 3
.
Added the function SUNProfiler_Reset
to reset the region timings and counters
to zero.
Added the functions ARKStepPrintAllStats
, ERKStepPrintAllStats
,MRIStepPrintAll
, CVodePrintAllStats
, IDAPrintAllStats
, andKINPrintAllStats
to output all of the integrator, nonlinear solver, linear
solver, and other statistics in one call. The file scripts/sundials_csv.py
contains functions for parsing the comma-separated value output files.
Added functions to CVODE, CVODES, IDA, and IDAS to change the default step size
adaptivity parameters. For more information see the documentation for:
CVodeSetEtaFixedStepBounds
CVodeSetEtaMaxFirstStep
CVodeSetEtaMaxEarlyStep
CVodeSetNumStepsEtaMaxEarlyStep
CVodeSetEtaMax
CVodeSetEtaMin
CVodeSetEtaMinErrFailEta
CVodeSetEtaMaxErrFailEta
CVodeSetNumFailsEtaMaxErrFail
CVodeSetEtaConvFail
IDASetEtaFixedStepBounds
IDAsetEtaMax
IDASetEtaMin
IDASetEtaLow
IDASetEtaMinErrFail
IDASetEtaConvFail
Added the functions CVodeSetDeltaGammaMaxLSetup
andCVodeSetDeltaGammaMaxBadJac
in CVODE and CVODES to adjust the gamma
change
thresholds to require a linear solver setup or Jacobian/precondition update,
respectively.
Added the function IDASetDetlaCjLSetup
in IDA and IDAS to adjust the parameter
that determines when a change in c_j
requires calling the linear solver setup
function.
Added the function MRIStepSetOrder
to select the default MRI method of a given
order.
Added support to CVODES for integrating IVPs with constraints using BDF methods
and projecting the solution onto the constraint manifold with a user defined
projection function. This implementation is accompanied by additions to the
CVODES user documentation and examples.
The behavior of N_VSetKernelExecPolicy_Sycl
has been updated to be consistent
with the CUDA and HIP vectors. The input execution policies are now cloned and
may be freed after calling N_VSetKernelExecPolicy_Sycl
. Additionally, NULL
inputs are now allowed and, if provided, will reset the vector execution
policies to the defaults.
Fixed the SUNContext
convenience class for C++ users to disallow copy
construction and allow move construction.
A memory leak in the SYCL vector was fixed where the execution policies were
not freed when the vector was destroyed.
The include guard in nvector_mpimanyvector.h
has been corrected to enable
using both the ManyVector and MPIManyVector NVector implementations in the same
simulation.
Changed exported SUNDIALS PETSc CMake targets to be INTERFACE IMPORTED instead
of UNKNOWN IMPORTED.
A bug was fixed in the integrator functions to retrieve the number of nonlinear
solver failures. The failure count returned was the number of failed steps due
to a nonlinear solver failure i.e., if a nonlinear solve failed with a stale
Jacobian or preconditioner but succeeded after updating the Jacobian or
preconditioner, the initial failure was not included in the nonlinear solver
failure count. The following functions have been updated to return the total
number of nonlinear solver failures:
ARKStepGetNumNonlinSolvConvFails
ARKStepGetNonlinSolvStats
MRIStepGetNumNonlinSolvConvFails
MRIStepGetNonlinSolvStats
CVodeGetNumNonlinSolvConvFails
CVodeGetNonlinSolvStats
CVodeGetSensNumNonlinSolvConvFails
CVodeGetSensNonlinSolvStats
CVodeGetStgrSensNumNonlinSolvConvFails
CVodeGetStgrSensNonlinSolvStats
IDAGetNumNonlinSolvConvFails
IDAGetNonlinSolvStats
IDAGetSensNumNonlinSolvConvFails
IDAGetSensNonlinSolvStats
As such users may see an increase in the number of failures reported from the
above functions. The following functions have been added to retrieve the number
of failed steps due to a nonlinear solver failure i.e., the counts previously
returned by the above functions:
ARKStepGetNumStepSolveFails
MRIStepGetNumStepSolveFails
CVodeGetNumStepSolveFails
CVodeGetNumStepSensSolveFails
CVodeGetNumStepStgrSensSolveFails
IDAGetNumStepSolveFails
IDAGetNumStepSensSolveFails
Changes to SUNDIALS in release v6.1.1
Fixed exported SUNDIALSConfig.cmake
.
Fixed Fortran interface to MRIStepInnerStepper
and ``MRIStepCoupling`
structures and functions.
Added new Fortran example program,examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90
demonstrating MRI
capabilities.
Changes to SUNDIALS in release v6.1.0
Added new reduction implementations for the CUDA and HIP NVECTORs that use shared memory (local data storage) instead of atomics. These new implementations are recommended when the target hardware does not provide atomic support for the floating point precision that SUNDIALS is being built with. The HIP vector uses these by default, but the N_VSetKernelExecPolicy_Cuda and N_VSetKernelExecPolicy_Hip functions can be used to choose between different reduction implementations.
SUNDIALS::<lib> targets with no static/shared suffix have been added for use within the build directory (this mirrors the targets exported on installation).
CMAKE_C_STANDARD is now set to 99 by default.
Fixed exported SUNDIALSConfig.cmake when profiling is enabled without Caliper.
Fixed sundials_export.h include in sundials_config.h.
Fixed memory leaks in the SUNLINSOL_SUPERLUMT linear solver.
Several other minor bug-fixes and improvements.
Changes to SUNDIALS in release v6.0.0
SUNContext
SUNDIALS v6.0.0 introduces a new SUNContext object on which all other SUNDIALS objects depend. As such, the constructors for all SUNDIALS packages, vectors, matrices, linear solvers, nonlinear solvers, and memory helpers have been updated to accept a context as the last input. Users upgrading to SUNDIALS v6.0.0 will need to call SUNContext_Create to create a context object with before calling any other SUNDIALS library function, and then provide this object to other SUNDIALS constructors. The context object has been introduced to allow SUNDIALS to provide new features, such as the profiling/instrumentation also introduced in this release, while maintaining thread-safety. See the documentation section on the SUNContext for more details.
A script upgrade-to-sundials-6-from-5.sh has been provided with the release (obtainable from the GitHub release page) to help ease the transition to SUNDIALS v6.0.0. The script will add a SUNCTX_PLACEHOLDER argument to all of the calls to SUNDIALS constructors that now require a SUNContext object. It can also update deprecated SUNDIALS constants/types to the new names. It can be run like this:
> ./upgrade-to-sundials-6-from-5.sh <files to update>
SUNProfiler
A capability to profile/instrument SUNDIALS library code has been added. This can be enabled with the CMake option SUNDIALS_BUILD_WITH_PROFILING. A built-in profiler will be used by default, but the Caliper library can also be used instead with the CMake option ENABLE_CALIPER. See the documentation section on profiling for more details. WARNING: Profiling will impact performance, and should be enabled judiciously.
SUNMemoryHelper
The SUNMemoryHelper functions Alloc, Dealloc, and Copy have been updated to accept an opaque handle as the last input. At a minimum, existing SUNMemoryHelper implementations will need to update these functions to accept the additional argument. Typically, this handle is the execution stream (e.g., a CUDA/HIP stream or SYCL queue) for the operation. The CUDA, HIP, and SYCL SUNMemoryHelper implementations have been updated accordingly. Additionally, the constructor for the SYCL implementation has been updated to remove the SYCL queue as an input.
NVector
Two new optional vector operations, N_VDotProdMultiLocal and N_VDotProdMultiAllReduce, have been added to support low-synchronization methods for Anderson acceleration.
The CUDA, HIP, and SYCL execution policies have been moved from the sundials namespace to the sundials::cuda, sundials::hip, and sundials::sycl namespaces respectively. Accordingly, the prefixes “Cuda”, “Hip”, and “Sycl” have been removed from the execution policy classes and methods.
The Sundials namespace used by the Trilinos Tpetra NVector has been replaced with the sundials::trilinos::nvector_tpetra namespace.
The serial, PThreads, PETSc, hypre, Parallel, OpenMP_DEV, and OpenMP vector functions N_VCloneVectorArray_* and N_VDestroyVectorArray_* have been deprecated. The generic N_VCloneVectorArray and N_VDestroyVectorArray functions should be used instead.
The previously deprecated constructor N_VMakeWithManagedAllocator_Cuda and the function N_VSetCudaStream_Cuda have been removed and replaced with N_VNewWithMemHelp_Cuda and N_VSetKerrnelExecPolicy_Cuda respectively.
The previously deprecated macros PVEC_REAL_MPI_TYPE and PVEC_INTEGER_MPI_TYPE have been removed and replaced with MPI_SUNREALTYPE and MPI_SUNINDEXTYPE respectively.
SUNLinearSolver
The following previously deprecated functions have been removed
Removed | Replaced with |
SUNBandLinearSolver | SUNLinSol_Band |
SUNDenseLinearSolver | SUNLinSol_Dense |
SUNKLU | SUNLinSol_KLU |
SUNKLUReInit | SUNLinSol_KLUReInit |
SUNKLUSetOrdering | SUNLinSol_KLUSetOrdering |
SUNLapackBand | SUNLinSol_LapackBand |
SUNLapackDense | SUNLinSol_LapackDense |
SUNPCG | SUNLinSol_PCG |
SUNPCGSetPrecType | SUNLinSol_PCGSetPrecType |
SUNPCGSetMaxl | SUNLinSol_PCGSetMaxl |
SUNSPBCGS | SUNLinSol_SPBCGS |
SUNSPBCGSSetPrecType | SUNLinSol_SPBCGSSetPrecType |
SUNSPBCGSSetMaxl | SUNLinSol_SPBCGSSetMaxl |
SUNSPFGMR | SUNLinSol_SPFGMR |
SUNSPFGMRSetPrecType | SUNLinSol_SPFGMRSetPrecType |
SUNSPFGMRSetGSType | SUNLinSol_SPFGMRSetGSType |
SUNSPFGMRSetMaxRestarts | SUNLinSol_SPFGMRSetMaxRestarts |
SUNSPGMR | SUNLinSol_SPGMR |
SUNSPGMRSetPrecType | SUNLinSol_SPGMRSetPrecType |
SUNSPGMRSetGSType | SUNLinSol_SPGMRSetGSType |
SUNSPGMRSetMaxRestarts | SUNLinSol_SPGMRSetMaxRestarts |
SUNSPTFQMR | SUNLinSol_SPTFQMR |
SUNSPTFQMRSetPrecType | SUNLinSol_SPTFQMRSetPrecType |
SUNSPTFQMRSetMaxl | SUNLinSol_SPTFQMRSetMaxl |
SUNSuperLUMT | SUNLinSol_SuperLUMT |
SUNSuperLUMTSetOrdering | SUNLinSol_SuperLUMTSetOrdering |
Fortran Interfaces
The ARKODE, CVODE, IDA, and KINSOL Fortran 77 interfaces have been removed. See the “SUNDIALS Fortran Interface” section in the user guides and the F2003 example programs for more details using the SUNDIALS Fortran 2003 module interfaces.
ARKODE
The ARKODE MRIStep module has been extended to support implicit-explicit (IMEX) multirate infinitesimal generalized additive Runge-Kutta (MRI-GARK) methods. As such, MRIStepCreate has been updated to include arguments for the slow explicit and slow implicit ODE right-hand side functions. MRIStepCreate has also been updated to require attaching an MRIStepInnerStepper for evolving the fast time scale. MRIStepReInit has been similarly updated to take explicit and implicit right-hand side functions as input. Codes using explicit or implicit MRI methods will need to update MRIStepCreate and MRIStepReInit calls to pass NULL for either the explicit or implicit right-hand side function as appropriate. If ARKStep is used as the fast time scale integrator, codes will need to call ARKStepCreateMRIStepInnerStepper to wrap the ARKStep memory as an MRIStepInnerStepper object. Additionally, MRIStepGetNumRhsEvals has been updated to return the number of slow implicit and explicit function evaluations. The coupling table structure MRIStepCouplingMem and the functions MRIStepCoupling_Alloc and MRIStepCoupling_Create have also been updated to support IMEX-MRI-GARK methods.
The deprecated functions MRIStepGetCurrentButcherTables and MRIStepWriteButcher and the utility functions MRIStepSetTable and MRIStepSetTableNum have been removed. Users wishing to create an MRI-GARK method from a Butcher table should use MRIStepCoupling_MIStoMRI to create the corresponding MRI coupling table and attach it with MRIStepSetCoupling.
The implementation of solve-decoupled implicit MRI-GARK methods has been updated to remove extraneous slow implicit function calls and reduce the memory requirements.
Deprecated ARKODE nonlinear solver predictors: specification of the ARKStep “bootstrap” or “minimum correction” predictors (options 4 and 5 from ARKStepSetPredictorMethod), or MRIStep “bootstrap” predictor (option 4 from MRIStepSetPredictorMethod), will output a deprecation warning message. These options will be removed in a future release.
The previously deprecated functions ARKStepSetMaxStepsBetweenLSet and ARKStepSetMaxStepsBetweenJac have been removed and replaced with ARKStepSetLSetupFrequency and ARKStepSetMaxStepsBetweenJac respectively.
CVODE
The previously deprecated function CVodeSetMaxStepsBetweenJac has been removed and replaced with CVodeSetJacEvalFrequency.
CVODES
Added a new function CVodeGetLinSolveStats to get the CVODES linear solver statistics as a group.
Added a new function, CVodeSetMonitorFn, that takes a user-function to be called by CVODES after every nst successfully completed time-steps. This is intended to provide a way of monitoring the CVODES statistics throughout the simulation.
The previously deprecated function CVodeSetMaxStepsBetweenJac has been removed and replaced with CVodeSetJacEvalFrequency.
KINSOL
New orthogonalization methods were added for use within Anderson acceleration in KINSOL. See the “Anderson Acceleration QR Factorization” subsection within the mathematical considerations chapter of the user guide and the KINSetOrthAA function documentation for more details.
Deprecations
In addition to the deprecations noted elsewhere, many constants, types, and functions have been renamed so that they are properly namespaced. The old names have been deprecated and will be removed in SUNDIALS v7.0.0.
The following constants, macros, and typedefs are now deprecated:
Deprecated Name | New Name |
realtype | sunrealtype |
booleantype | sunbooleantype |
RCONST | SUN_RCONST |
BIG_REAL | SUN_BIG_REAL |
SMALL_REAL | SUN_SMALL_REAL |
UNIT_ROUNDOFF | SUN_UNIT_ROUNDOFF |
PREC_NONE | SUN_PREC_NONE |
PREC_LEFT | SUN_PREC_LEFT |
PREC_RIGHT | SUN_PREC_RIGHT |
PREC_BOTH | SUN_PREC_BOTH |
MODIFIED_GS | SUN_MODIFIED_GS |
CLASSICAL_GS | SUN_CLASSICAL_GS |
ATimesFn | SUNATimesFn |
PSetupFn | SUNPSetupFn |
PSolveFn | SUNPSolveFn |
DlsMat | SUNDlsMat |
DENSE_COL | SUNDLS_DENSE_COL |
DENSE_ELEM | SUNDLS_DENSE_ELEM |
BAND_COL | SUNDLS_BAND_COL |
BAND_COL_ELEM | SUNDLS_BAND_COL_ELEM |
BAND_ELEM | SUNDLS_BAND_ELEM |
SDIRK_2_1_2 | ARKODE_SDIRK_2_1_2 |
BILLINGTON_3_3_2 | ARKODE_BILLINGTON_3_3_2 |
TRBDF2_3_3_2 | ARKODE_TRBDF2_3_3_2 |
KVAERNO_4_2_3 | ARKODE_KVAERNO_4_2_3 |
ARK324L2SA_DIRK_4_2_3 | ARKODE_ARK324L2SA_DIRK_4_2_3 |
CASH_5_2_4 | ARKODE_CASH_5_2_4 |
CASH_5_3_4 | ARKODE_CASH_5_3_4 |
SDIRK_5_3_4 | ARKODE_SDIRK_5_3_4 |
KVAERNO_5_3_4 | ARKODE_KVAERNO_5_3_4 |
ARK436L2SA_DIRK_6_3_4 | ARKODE_ARK436L2SA_DIRK_6_3_4 |
KVAERNO_7_4_5 | ARKODE_KVAERNO_7_4_5 |
ARK548L2SA_DIRK_8_4_5 | ARKODE_ARK548L2SA_DIRK_8_4_5 |
ARK437L2SA_DIRK_7_3_4 | ARKODE_ARK437L2SA_DIRK_7_3_4 |
ARK548L2SAb_DIRK_8_4_5 | ARKODE_ARK548L2SAb_DIRK_8_4_5 |
MIN_DIRK_NUM | ARKODE_MIN_DIRK_NUM |
MAX_DIRK_NUM | ARKODE_MAX_DIRK_NUM |
MIS_KW3 | ARKODE_MIS_KW3 |
MRI_GARK_ERK33a | ARKODE_MRI_GARK_ERK33a |
MRI_GARK_ERK45a | ARKODE_MRI_GARK_ERK45a |
MRI_GARK_IRK21a | ARKODE_MRI_GARK_IRK21a |
MRI_GARK_ESDIRK34a | ARKODE_MRI_GARK_ESDIRK34a |
MRI_GARK_ESDIRK46a | ARKODE_MRI_GARK_ESDIRK46a |
IMEX_MRI_GARK3a | ARKODE_IMEX_MRI_GARK3a |
IMEX_MRI_GARK3b | ARKODE_IMEX_MRI_GARK3b |
IMEX_MRI_GARK4 | ARKODE_IMEX_MRI_GARK4 |
MIN_MRI_NUM | ARKODE_MIN_MRI_NUM |
MAX_MRI_NUM | ARKODE_MAX_MRI_NUM |
DEFAULT_MRI_TABLE_3 | MRISTEP_DEFAULT_TABLE_3 |
DEFAULT_EXPL_MRI_TABLE_3 | MRISTEP_DEFAULT_EXPL_TABLE_3 |
DEFAULT_EXPL_MRI_TABLE_4 | MRISTEP_DEFAULT_EXPL_TABLE_4 |
DEFAULT_IMPL_SD_TABLE_2 | MRISTEP_DEFAULT_IMPL_SD_TABLE_2 |
DEFAULT_IMPL_SD_TABLE_3 | MRISTEP_DEFAULT_IMPL_SD_TABLE_3 |
DEFAULT_IMPL_SD_TABLE_4 | MRISTEP_DEFAULT_IMPL_SD_TABLE_4 |
DEFAULT_IMEX_SD_TABLE_3 | MRISTEP_DEFAULT_IMEX_SD_TABLE_3 |
DEFAULT_IMEX_SD_TABLE_4 | MRISTEP_DEFAULT_IMEX_SD_TABLE_4 |
HEUN_EULER_2_1_2 | ARKODE_HEUN_EULER_2_1_2 |
BOGACKI_SHAMPINE_4_2_3 | ARKODE_BOGACKI_SHAMPINE_4_2_3 |
ARK324L2SA_ERK_4_2_3 | ARKODE_ARK324L2SA_ERK_4_2_3 |
ZONNEVELD_5_3_4 | ARKODE_ZONNEVELD_5_3_4 |
ARK436L2SA_ERK_6_3_4 | ARKODE_ARK436L2SA_ERK_6_3_4 |
SAYFY_ABURUB_6_3_4 | ARKODE_SAYFY_ABURUB_6_3_4 |
CASH_KARP_6_4_5 | ARKODE_CASH_KARP_6_4_5 |
FEHLBERG_6_4_5 | ARKODE_FEHLBERG_6_4_5 |
DORMAND_PRINCE_7_4_5 | ARKODE_DORMAND_PRINCE_7_4_5 |
ARK548L2SA_ERK_8_4_5 | ARKODE_ARK548L2SA_ERK_8_4_5 |
VERNER_8_5_6 | ARKODE_VERNER_8_5_6 |
FEHLBERG_13_7_8 | ARKODE_FEHLBERG_13_7_8 |
KNOTH_WOLKE_3_3 | ARKODE_KNOTH_WOLKE_3_3 |
ARK437L2SA_ERK_7_3_4 | ARKODE_ARK437L2SA_ERK_7_3_4 |
ARK548L2SAb_ERK_8_4_5 | ARKODE_ARK548L2SAb_ERK_8_4_5 |
MIN_ERK_NUM | ARKODE_MIN_ERK_NUM |
MAX_ERK_NUM | ARKODE_MAX_ERK_NUM |
DEFAULT_ERK_2 | ARKSTEP_DEFAULT_ERK_2 |
DEFAULT_ERK_3 | ARKSTEP_DEFAULT_ERK_3 |
DEFAULT_ERK_4 | ARKSTEP_DEFAULT_ERK_4 |
DEFAULT_ERK_5 | ARKSTEP_DEFAULT_ERK_5 |
DEFAULT_ERK_6 | ARKSTEP_DEFAULT_ERK_6 |
DEFAULT_ERK_8 | ARKSTEP_DEFAULT_ERK_8 |
DEFAULT_DIRK_2 | ARKSTEP_DEFAULT_DIRK_2 |
DEFAULT_DIRK_3 | ARKSTEP_DEFAULT_DIRK_3 |
DEFAULT_DIRK_4 | ARKSTEP_DEFAULT_DIRK_4 |
DEFAULT_DIRK_5 | ARKSTEP_DEFAULT_DIRK_5 |
DEFAULT_ARK_ETABLE_3 | ARKSTEP_DEFAULT_ARK_ETABLE_3 |
DEFAULT_ARK_ETABLE_4 | ARKSTEP_DEFAULT_ARK_ETABLE_4 |
DEFAULT_ARK_ETABLE_5 | ARKSTEP_DEFAULT_ARK_ETABLE_4 |
DEFAULT_ARK_ITABLE_3 | ARKSTEP_DEFAULT_ARK_ITABLE_3 |
DEFAULT_ARK_ITABLE_4 | ARKSTEP_DEFAULT_ARK_ITABLE_4 |
DEFAULT_ARK_ITABLE_5 | ARKSTEP_DEFAULT_ARK_ITABLE_5 |
DEFAULT_ERK_2 | ERKSTEP_DEFAULT_2 |
DEFAULT_ERK_3 | ERKSTEP_DEFAULT_3 |
DEFAULT_ERK_4 | ERKSTEP_DEFAULT_4 |
DEFAULT_ERK_5 | ERKSTEP_DEFAULT_5 |
DEFAULT_ERK_6 | ERKSTEP_DEFAULT_6 |
DEFAULT_ERK_8 | ERKSTEP_DEFAULT_8 |
In addition, the following functions are now deprecated (compile-time warnings will be thrown if supported by the compiler):
Deprecated Name | New Name |
CVSpilsSetLinearSolver | CVodeSetLinearSolver |
CVSpilsSetEpsLin | CVodeSetEpsLin |
CVSpilsSetPreconditioner | CVodeSetPreconditioner |
CVSpilsSetJacTimes | CVodeSetJacTimes |
CVSpilsGetWorkSpace | CVodeGetLinWorkSpace |
CVSpilsGetNumPrecEvals | CVodeGetNumPrecEvals |
CVSpilsGetNumPrecSolves | CVodeGetNumPrecSolves |
CVSpilsGetNumLinIters | CVodeGetNumLinIters |
CVSpilsGetNumConvFails | CVodeGetNumConvFails |
CVSpilsGetNumJTSetupEvals | CVodeGetNumJTSetupEvals |
CVSpilsGetNumJtimesEvals | CVodeGetNumJtimesEvals |
CVSpilsGetNumRhsEvals | CVodeGetNumLinRhsEvals |
CVSpilsGetLastFlag | CVodeGetLastLinFlag |
CVSpilsGetReturnFlagName | CVodeGetLinReturnFlagName |
CVSpilsSetLinearSolverB | CVodeSetLinearSolverB |
CVSpilsSetEpsLinB | CVodeSetEpsLinB |
CVSpilsSetPreconditionerB | CVodeSetPreconditionerB |
CVSpilsSetPreconditionerBS | CVodeSetPreconditionerBS |
CVSpilsSetJacTimesB | CVodeSetJacTimesB |
CVSpilsSetJacTimesBS | CVodeSetJacTimesBS |
CVDlsSetLinearSolver | CVodeSetLinearSolver |
CVDlsSetJacFn | CVodeSetJacFn |
CVDlsGetWorkSpace | CVodeGetLinWorkSpace |
CVDlsGetNumJacEvals | CVodeGetNumJacEvals |
CVDlsGetNumRhsEvals | CVodeGetNumLinRhsEvals |
CVDlsGetLastFlag | CVodeGetLastLinFlag |
CVDlsGetReturnFlagName | CVodeGetLinReturnFlagName |
CVDlsSetLinearSolverB | CVodeSetLinearSolverB |
CVDlsSetJacFnB | CVodeSetJacFnB |
CVDlsSetJacFnBS | CVodeSetJacFnBS |
CVDlsSetLinearSolver | CVodeSetLinearSolver |
CVDlsSetJacFn | CVodeSetJacFn |
CVDlsGetWorkSpace | CVodeGetLinWorkSpace |
CVDlsGetNumJacEvals | CVodeGetNumJacEvals |
CVDlsGetNumRhsEvals | CVodeGetNumLinRhsEvals |
CVDlsGetLastFlag | CVodeGetLastLinFlag |
CVDlsGetReturnFlagName | CVodeGetLinReturnFlagName |
KINDlsSetLinearSolver | KINSetLinearSolver |
KINDlsSetJacFn | KINSetJacFn |
KINDlsGetWorkSpace | KINGetLinWorkSpace |
KINDlsGetNumJacEvals | KINGetNumJacEvals |
KINDlsGetNumFuncEvals | KINGetNumLinFuncEvals |
KINDlsGetLastFlag | KINGetLastLinFlag |
KINDlsGetReturnFlagName | KINGetLinReturnFlagName |
KINSpilsSetLinearSolver | KINSetLinearSolver |
KINSpilsSetPreconditioner | KINSetPreconditioner |
KINSpilsSetJacTimesVecFn | KINSetJacTimesVecFn |
KINSpilsGetWorkSpace | KINGetLinWorkSpace |
KINSpilsGetNumPrecEvals | KINGetNumPrecEvals |
KINSpilsGetNumPrecSolves | KINGetNumPrecSolves |
KINSpilsGetNumLinIters | KINGetNumLinIters |
KINSpilsGetNumConvFails | KINGetNumLinConvFails |
KINSpilsGetNumJtimesEvals | KINGetNumJtimesEvals |
KINSpilsGetNumFuncEvals | KINGetNumLinFuncEvals |
KINSpilsGetLastFlag | KINGetLastLinFlag |
KINSpilsGetReturnFlagName | KINGetLinReturnFlagName |
IDASpilsSetLinearSolver | IDASetLinearSolver |
IDASpilsSetPreconditioner | IDASetPreconditioner |
IDASpilsSetJacTimes | IDASetJacTimes |
IDASpilsSetEpsLin | IDASetEpsLin |
IDASpilsSetIncrementFactor | IDASetIncrementFactor |
IDASpilsGetWorkSpace | IDAGetLinWorkSpace |
IDASpilsGetNumPrecEvals | IDAGetNumPrecEvals |
IDASpilsGetNumPrecSolves | IDAGetNumPrecSolves |
IDASpilsGetNumLinIters | IDAGetNumLinIters |
IDASpilsGetNumConvFails | IDAGetNumLinConvFails |
IDASpilsGetNumJTSetupEvals | IDAGetNumJTSetupEvals |
IDASpilsGetNumJtimesEvals | IDAGetNumJtimesEvals |
IDASpilsGetNumResEvals | IDAGetNumLinResEvals |
IDASpilsGetLastFlag | IDAGetLastLinFlag |
IDASpilsGetReturnFlagName | IDAGetLinReturnFlagName |
IDASpilsSetLinearSolverB | IDASetLinearSolverB |
IDASpilsSetEpsLinB | IDASetEpsLinB |
IDASpilsSetIncrementFactorB | IDASetIncrementFactorB |
IDASpilsSetPreconditionerB | IDASetPreconditionerB |
IDASpilsSetPreconditionerBS | IDASetPreconditionerBS |
IDASpilsSetJacTimesB | IDASetJacTimesB |
IDASpilsSetJacTimesBS | IDASetJacTimesBS |
IDADlsSetLinearSolver | IDASetLinearSolver |
IDADlsSetJacFn | IDASetJacFn |
IDADlsGetWorkSpace | IDAGetLinWorkSpace |
IDADlsGetNumJacEvals | IDAGetNumJacEvals |
IDADlsGetNumResEvals | IDAGetNumLinResEvals |
IDADlsGetLastFlag | IDAGetLastLinFlag |
IDADlsGetReturnFlagName | IDAGetLinReturnFlagName |
IDADlsSetLinearSolverB | IDASetLinearSolverB |
IDADlsSetJacFnB | IDASetJacFnB |
IDADlsSetJacFnBS | IDASetJacFnBS |
DenseGETRF | SUNDlsMat_DenseGETRF |
DenseGETRS | SUNDlsMat_DenseGETRS |
denseGETRF | SUNDlsMat_denseGETRF |
denseGETRS | SUNDlsMat_denseGETRS |
DensePOTRF | SUNDlsMat_DensePOTRF |
DensePOTRS | SUNDlsMat_DensePOTRS |
densePOTRF | SUNDlsMat_densePOTRF |
densePOTRS | SUNDlsMat_densePOTRS |
DenseGEQRF | SUNDlsMat_DenseGEQRF |
DenseORMQR | SUNDlsMat_DenseORMQR |
denseGEQRF | SUNDlsMat_denseGEQRF |
denseORMQR | SUNDlsMat_denseORMQR |
DenseCopy | SUNDlsMat_DenseCopy |
denseCopy | SUNDlsMat_denseCopy |
DenseScale | SUNDlsMat_DenseScale |
denseScale | SUNDlsMat_denseScale |
denseAddIdentity | SUNDlsMat_denseAddIdentity |
DenseMatvec | SUNDlsMat_DenseMatvec |
denseMatvec | SUNDlsMat_denseMatvec |
BandGBTRF | SUNDlsMat_BandGBTRF |
bandGBTRF | SUNDlsMat_bandGBTRF |
BandGBTRS | SUNDlsMat_BandGBTRS |
bandGBTRS | SUNDlsMat_bandGBTRS |
BandCopy | SUNDlsMat_BandCopy |
bandCopy | SUNDlsMat_bandCopy |
BandScale | SUNDlsMat_BandScale |
bandScale | SUNDlsMat_bandScale |
bandAddIdentity | SUNDlsMat_bandAddIdentity |
BandMatvec | SUNDlsMat_BandMatvec |
bandMatvec | SUNDlsMat_bandMatvec |
ModifiedGS | SUNModifiedGS |
ClassicalGS | SUNClassicalGS |
QRfact | SUNQRFact |
QRsol | SUNQRsol |
DlsMat_NewDenseMat | SUNDlsMat_NewDenseMat |
DlsMat_NewBandMat | SUNDlsMat_NewBandMat |
DestroyMat | SUNDlsMat_DestroyMat |
NewIntArray | SUNDlsMat_NewIntArray |
NewIndexArray | SUNDlsMat_NewIndexArray |
NewRealArray | SUNDlsMat_NewRealArray |
DestroyArray | SUNDlsMat_DestroyArray |
AddIdentity | SUNDlsMat_AddIdentity |
SetToZero | SUNDlsMat_SetToZero |
PrintMat | SUNDlsMat_PrintMat |
newDenseMat | SUNDlsMat_newDenseMat |
newBandMat | SUNDlsMat_newBandMat |
destroyMat | SUNDlsMat_destroyMat |
newIntArray | SUNDlsMat_newIntArray |
newIndexArray | SUNDlsMat_newIndexArray |
newRealArray | SUNDlsMat_newRealArray |
destroyArray | SUNDlsMat_destroyArray |
In addition, the entire sundials_lapack.h header file is now deprecated for removal in SUNDIALS v7.0.0. Note, this header file is not needed to use the SUNDIALS LAPACK linear solvers.
Changes to SUNDIALS in release v5.8.0
The RAJA NVECTOR implementation has been updated to support the SYCL backend in addition to the CUDA and HIP backend. Users can choose the backend when configuring SUNDIALS by using the SUNDIALS_RAJA_BACKENDS CMake variable. This module remains experimental and is subject to change from version to version.
A new SUNMatrix and SUNLinearSolver implementation were added to interface with the Intel oneAPI Math Kernel Library (oneMKL). Both the matrix and the linear solver support general dense linear systems as well as block diagonal linear systems. This module is experimental and is subject to change from version to version.
Added a new optional function to the SUNLinearSolver API, SUNLinSolSetZeroGuess, to indicate that the next call to SUNlinSolSolve will be made with a zero initial guess. SUNLinearSolver implementations that do not use the SUNLinSolNewEmpty constructor will, at a minimum, need set the setzeroguess function pointer in the linear solver ops structure to NULL. The SUNDIALS iterative linear solver implementations have been updated to leverage this new set function to remove one dot product per solve.
The time integrator packages (ARKODE, CVODE(S), and IDA(S)) all now support a new "matrix-embedded" SUNLinearSolver type. This type supports user-supplied SUNLinearSolver implementations that set up and solve the specified linear system at each linear solve call. Any matrix-related data structures are held internally to the linear solver itself, and are not provided by the SUNDIALS package.
Added functions to ARKODE and CVODE(S) for supplying an alternative right-hand side function and to IDA(S) for supplying an alternative residual for use within nonlinear system function evaluations.
Support for user-defined inner (fast) integrators has been to the MRIStep module in ARKODE. See the "MRIStep Custom Inner Steppers" section in the user guide for more information on providing a user-defined integration method.
Added specialized fused HIP kernels to CVODE which may offer better performance on smaller problems when using CVODE with the NVECTOR_HIP module. See the optional input function CVodeSetUseIntegratorFusedKernels for more information. As with other SUNDIALS HIP features, this is feature is experimental and may change from version to version.
New KINSOL options have been added to apply a constant damping factor in the fixed point and Picard iterations (see KINSetDamping), to delay the start of Anderson acceleration with the fixed point and Picard iterations (see KINSetDelayAA), and to return the newest solution with the fixed point iteration (see KINSetReturnNewest).
The installed SUNDIALSConfig.cmake file now supports the COMPONENTS option to find_package. The exported targets no longer have IMPORTED_GLOBAL set.
A bug was fixed in SUNMatCopyOps where the matrix-vector product setup function pointer was not copied.
A bug was fixed in the SPBCGS and SPTFQMR solvers for the case where a non-zero initial guess and a solution scaling vector are provided. This fix only impacts codes using SPBCGS or SPTFQMR as standalone solvers as all SUNDIALS packages utilize a zero initial guess.
A bug was fixed in the ARKODE stepper modules where the stop time may be passed after resetting the integrator.
A bug was fixed in IDASetJacTimesResFn in IDAS where the supplied function was used in the dense finite difference Jacobian computation rather than the finite difference Jacobian-vector product approximation.
A bug was fixed in the KINSOL Picard iteration where the value of KINSetMaxSetupCalls would be ignored.
Changes to SUNDIALS in release v5.7.0
A new NVECTOR implementation based on the SYCL abstraction layer has been added targeting Intel GPUs. At present the only SYCL compiler supported is the DPC++ (Intel oneAPI) compiler. See the SYCL NVECTOR section in the user guide for more details. This module is considered experimental and is subject to major changes even in minor releases.
A new SUNMatrix and SUNLinearSolver implementation were added to interface with the MAGMA linear algebra library. Both the matrix and the linear solver support general dense linear systems as well as block diagonal linear systems, and both are targeted at GPUs (AMD or NVIDIA).
Changes to SUNDIALS in release v5.6.1
Fixed a bug in the SUNDIALS CMake which caused an error if the CMAKE_CXX_STANDARD and SUNDIALS_RAJA_BACKENDS options were not provided.
Fixed some compiler warnings when using the IBM XL compilers.
Changes to SUNDIALS in release v5.6.0
A new NVECTOR implementation based on the AMD ROCm HIP platform has been added. This vector can target NVIDIA or AMD GPUs. See HIP NVECTOR section in the user guide for more details. This module is considered experimental and is subject to change from version to version.
The RAJA NVECTOR implementation has been updated to support the HIP backend in addition to the CUDA backend. Users can choose the backend when configuring SUNDIALS by using the `SUNDIALS_RAJA_BACKENDS` CMake variable. This module remains experimental and is subject to change from version to version.
A new optional operation, `N_VGetDeviceArrayPointer`, was added to the N_Vector API. This operation is useful for N_Vectors that utilize dual memory spaces, e.g. the native SUNDIALS CUDA N_Vector.
The SUNMATRIX_CUSPARSE and SUNLINEARSOLVER_CUSOLVERSP_BATCHQR implementations no longer require the SUNDIALS CUDA N_Vector. Instead, they require that the vector utilized provides the `N_VGetDeviceArrayPointer` operation, and that the pointer returned by `N_VGetDeviceArrayPointer` is a valid CUDA device pointer.
Changes to SUNDIALS in release v5.5.0
Refactored the SUNDIALS CMake build system to improve build times by as much as 35%. CMake 3.12.0 or newer is now required. Users will likely see CMake deprecation warnings, and potentially new errors when incompatible CMake options have been set (previously, these would fail silently). Otherwise, the changes should be fully backwards compatible for almost all users. SUNDIALS now exports CMake targets and installs a SUNDIALSConfig.cmake file.
Added support for SuperLU DIST 6.3.0+.
Changes to SUNDIALS in release v5.4.0
Added full support for time-dependent mass matrices in ARKStep, and expanded existing non-identity mass matrix infrastructure to support use of the fixed point nonlinear solver. Fixed bug for ERK method integration with static mass matrices.
An interface between ARKStep and the XBraid multigrid reduction in time (MGRIT) library has been added to enable parallel-in-time integration. See the ARKStep documentation and examples for more details. This interface required the addition of three new N_Vector operations to exchange vector data between computational nodes, see N_VBufSize, N_VBufPack, and N_VBufUnpack. These N_Vector operations are only used within the XBraid interface and need not be implemented for any other context.
Updated the MRIStep time-stepping module in ARKODE to support higher-order MRI-GARK methods [Sandu, SIAM J. Numer. Anal., 57, 2019], including methods that involve solve-decoupled, diagonally-implicit treatment of the slow time scale.
A new API, SUNMemoryHelper, was added to support GPU users who have complex memory management needs such as using memory pools. This is paired with new constructors for the NVECTOR_CUDA and NVECTOR_RAJA modules that accept a SUNMemoryHelper object. Refer to "The SUNMemoryHelper API", "NVECTOR CUDA" and "NVECTOR RAJA" sections in the documentation for more information.
The NVECTOR_RAJA module has been updated to mirror the NVECTOR_CUDA module. Notably, the update adds managed memory support to the NVECTOR_RAJA module. Users of the module will need to update any calls to the N_VMake_Raja function because that signature was changed. This module remains experimental and is subject to change from version to version.
Added new SetLSNormFactor() functions to CVODE(S), ARKODE, and IDA(S) to specify the factor for converting between integrator tolerances (WRMS norm) and linear solver tolerances (L2 norm) i.e., tol_L2 = nrmfac * tol_WRMS.
Added new reset functions ARKStepReset(), ERKStepReset(), and MRIStepReset() to reset the stepper time and state vector to user-provided values for continuing the integration from that point while retaining the integration history. These function complement the reinitialization functions ARKStepReInit(), ERKStepReInit(), and MRIStepReInit() which reinitialize the stepper so that the problem integration should resume as if started from scratch.
Added new functions for advanced users providing a custom SUNNonlinSolSysFn.
The expected behavior of SUNNonlinSolGetNumIters and SUNNonlinSolGetNumConvFails in the SUNNonlinearSolver API have been updated to specify that they should return the number of nonlinear solver iterations and convergence failures in the most recent solve respectively rather than the cumulative number of iterations and failures across all solves respectively. The API documentation and SUNDIALS provided SUNNonlinearSolver implementations and have been updated accordingly. As before, the cumulative number of nonlinear iterations and failures may be retrieved by calling the integrator provided get functions.
This change may cause a runtime error in existing user code. In IDAS and CVODES, the functions for forward integration with checkpointing (IDASolveF, CVodeF) are now subject to a restriction on the number of time steps allowed to reach the output time. This is the same restriction applied to the IDASolve and CVode functions. The default maximum number of steps is 500, but this may be changed using the <IDA|CVode>SetMaxNumSteps function. This change fixes a bug that could cause an infinite loop in the IDASolveF and CVodeF and functions.
A minor inconsistency in CVODE(S) and a bug ARKODE when checking the Jacobian evaluation frequency has been fixed. As a result codes using using a non-default Jacobian update frequency through a call to CVodeSetMaxStepsBetweenJac or ARKStepSetMaxStepsBetweenJac will need to increase the provided value by 1 to achieve the same behavior as before. For greater clarity the functions CVodeSetMaxStepsBetweenJac, ARKStepSetMaxStepsBetweenJac, and ARKStepSetMaxStepsBetweenLSet have been deprecated and replaced with CVodeSetJacEvalFrequency, ARKStepSetJacEvalFrequency, and ARKStepSetLSetupFrequency respectively. Additionally, the function CVodeSetLSetupFrequency has been added to CVODE(S) to set the frequency of calls to the linear solver setup function.
The NVECTOR_TRILINOS module has been updated to work with Trilinos 12.18+. This update changes the local ordinal type to always be an int.
Added support for CUDA v11.
Changes to SUNDIALS in release v5.3.0
Added support to CVODE for integrating IVPs with constraints using BDF methods and projecting the solution onto the constraint manifold with a user defined projection function. This implementation is accompanied by additions to the CVODE user documentation and examples.
Added the ability to control the CUDA kernel launch parameters for the NVECTOR_CUDA and SUNMATRIX_CUSPARSE modules. These modules remain experimental and are subject to change from version to version. In addition, the NVECTOR_CUDA kernels were rewritten to be more flexible. Most users should see equivalent performance or some improvement, but a select few may observe minor performance degradation with the default settings. Users are encouraged to contact the SUNDIALS team about any performance changes that they notice.
Added new capabilities for monitoring the solve phase in the SUNNONLINSOL_NEWTON and SUNNONLINSOL_FIXEDPOINT modules, and the SUNDIALS iterative linear solver modules. SUNDIALS must be built with the CMake option SUNDIALS_BUILD_WITH_MONITORING to use these capabilities.
Added specialized fused CUDA kernels to CVODE which may offer better performance on smaller problems when using CVODE with the NVECTOR_CUDA module. See the optional input function CVodeSetUseIntegratorFusedKernels for more information. As with other SUNDIALS CUDA features, this feature is experimental and may change from version to version.
Added a new function, CVodeSetMonitorFn, that takes a user-function to be called by CVODE after every nst successfully completed time-steps. This is intended to provide a way of monitoring the CVODE statistics throughout the simulation.
Added a new function CVodeGetLinSolveStats to get the CVODE linear solver statistics as a group.
Added optional set functions to provide an alternative ODE right-hand side function (ARKode and CVODE(S)), DAE residual function (IDA(S)), or nonlinear system function (KINSOL) for use when computing Jacobian-vector products with the internal difference quotient approximation.
Fixed a bug in ARKode where the prototypes for ERKStepSetMinReduction() and ARKStepSetMinReduction() were not included in arkode_erkstep.h and arkode_arkstep.h respectively.
Fixed a bug in ARKode where inequality constraint checking would need to be disabled and then re-enabled to update the inequality constraint values after resizing a problem. Resizing a problem will now disable constraints and a call to ARKStepSetConstraints or ERKStepSetConstraints is required to re-enable constraint checking for the new problem size.
Fixed a bug in the iterative linear solver modules where an error is not returned if the Atimes function is NULL or, if preconditioning is enabled, the PSolve function is NULL.
Changes to SUNDIALS in release v5.2.0
Fixed a build system bug related to the Fortran 2003 interfaces when using the IBM XL compiler. When building the Fortran 2003 interfaces with an XL compiler it is recommended to set CMAKE_Fortran_COMPILER to f2003, xlf2003, or xlf2003_r.
Fixed a bug in how ARKode interfaces with a user-supplied, iterative, unscaled linear solver. In this case, ARKode adjusts the linear solver tolerance in an attempt to account for the lack of support for left/right scaling matrices. Previously, ARKode computed this scaling factor using the error weight vector, ewt; this fix changes that to the residual weight vector,
Fixed a linkage bug affecting Windows users that stemmed from dllimport/dllexport attribute missing on some SUNDIALS API functions.
Fixed a bug in how ARKode interfaces with a user-supplied, iterative, unscaled linear solver. In this case, ARKode adjusts the linear solver tolerance in an attempt to account for the lack of support for left/right scaling matrices. Previously, ARKode computed this scaling factor using the error weight vector, ewt; this fix changes that to the residual weight vector, rwt, that can differ from ewt when solving problems with non-identity mass matrix.
Fixed a similar bug in how ARKode interfaces with scaled linear solvers when solving problems with non-identity mass matrices. Here, the left scaling matrix should correspond with rwt and the right scaling matrix with ewt; these were reversed but are now correct.
Fixed a memory leak in CVODES and IDAS from not deallocating the atolSmin0 and atolQSmin0 arrays.
Fixed a bug where a non-default value for the maximum allowed growth factor after the first step would be ignored.
Functions were added to each of the time integration packages to enable or disable the scaling applied to linear system solutions with matrix-based linear solvers to account for lagged matrix information.
Added two new functions, ARKStepSetMinReduction() and ERKStepSetMinReduction() to change the minimum allowed step size reduction factor after an error test failure.
Added a new SUNMatrix implementation, SUNMATRIX_CUSPARSE, that interfaces to the sparse matrix implementation from the NVIDIA cuSPARSE library. In addition, the SUNLINSOL_CUSOLVER_BATCHQR linear solver has been updated to use this matrix; therefore, users of this module will need to update their code. These modules are still considered to be experimental, thus they are subject to breaking changes even in minor releases.
Added a new “stiff” interpolation module to ARKode, based on Lagrange polynomial interpolation, that is accessible to each of the ARKStep, ERKStep and MRIStep time-stepping modules. This module is designed to provide increased interpolation accuracy when integrating stiff problems, as opposed to the ARKode-standard Hermite interpolation module that can suffer when the IVP right-hand side has large Lipschitz constant. While the Hermite module remains the default, the new Lagrange module may be enabled using one of the routines ARKStepSetInterpolantType, ERKStepSetInterpolantType, or MRIStepSetInterpolantType. The serial example problem ark_brusselator.c has been converted to use this Lagrange interpolation module. Created accompanying routines ARKStepSetInterpolantDegree, ARKStepSetInterpolantDegree and ARKStepSetInterpolantDegree to provide user control over these interpolating polynomials. While the routines ARKStepSetDenseOrder, ARKStepSetDenseOrder and ARKStepSetDenseOrder still exist, these have been deprecated and will be removed in a future release.
Changes to SUNDIALS in minor release v5.1.0
Added support for damping to the "SUNNonlinearSolver_FixedPoint" module when using Anderson acceleration. See the "SUNNonlinearSolver_FixedPoint" section in the user guides and the description of the SUNNonlinSolSetDamping_FixedPoint function for more details.
Added two utility functions, SUNDIALSFileOpen and SUNDIALSFileClose for creating/destroying file pointers. These are useful when using the Fortran 2003 interfaces.
Fixed a build system bug related to finding LAPACK/BLAS.
Fixed a build system bug related to checking if the KLU library works.
Fixed a build system bug related to finding PETSc when using the CMake variables PETSC_INCLUDES and PETSC_LIBRARIES instead of PETSC_DIR.
Added a new build system option, CUDA_ARCH, to specify the CUDA architecture to compile for.
Added support for a user-supplied function to update the prediction for each implicit stage solution in ARKStep. If supplied, this routine will be called after any existing ARKStep predictor algorithm completes, so that the predictor may be modified by the user as desired. The new user-supplied routine has type ARKStepStagePredictFn, and may be set by calling ARKStepSetStagePredictFn.
The MRIStep module has been updated to support attaching different user data pointers to the inner and outer integrators. If applicable, user codes will need to add a call to ARKStepSetUserData to attach their user data pointer to the inner integrator memory as MRIStepSetUserData will not set the pointer for both the inner and outer integrators. The MRIStep examples have been updated to reflect this change.
Added support for damping when using Anderson acceleration in KINSOL. See the mathematical considerations section of the user guide and the description of the KINSetDampingAA function for more details.
Changes to SUNDIALS in major release v5.0.0
Build System
Increased the minimum required CMake version to 3.5 for most SUNDIALS configurations, and 3.10 when CUDA or OpenMP with device offloading are enabled.
The CMake option BLAS_ENABLE and the variable BLAS_LIBRARIES have been removed to simplify builds as SUNDIALS packages do not use BLAS directly. For third party libraries that require linking to BLAS, the path to the BLAS library should be included in the _LIBRARIES variable for the third party library e.g., SUPERLUDIST_LIBRARIES when enabling SuperLU_DIST.
Fixed a bug in the build system that prevented the PThreads NVECTOR module from being built.
NVector
Two new functions were added to aid in creating custom NVECTOR objects. The constructor N_VNewEmpty() allocates an ``empty'' generic NVECTOR with the object's content pointer and the function pointers in the operations structure initialized to NULL. When used in the constructor for custom objects this function will ease the introduction of any new optional operations to the NVECTOR API by ensuring only required operations need to be set. Additionally, the function N_VCopyOps(w, v) has been added to copy the operation function pointers between vector objects. When used in clone routines for custom vector objects these functions also will ease the introduction of any new optional operations to the NVECTOR API by ensuring all operations are copied when cloning objects.
Two new N_Vector implementations, NVECTOR_MANYVECTOR and NVECTOR_MPIMANYVECTOR, have been created to support flexible partitioning of solution data among different processing elements (e.g., CPU + GPU) or for multi-physics problems that couple distinct MPI-based simulations together (see the NVECTOR_MANYVECTOR and NVECTOR_MPIMANYVECTOR sections in the user guides for more details). This implementation is accompanied by additions to user documentation and SUNDIALS examples.
An additional NVECTOR implementation, NVECTOR_MPIPLUSX, has been created to support the MPI+X paradigm where X is a type of on-node parallelism (e.g., OpenMP, CUDA). The implementation is accompanied by additions to user documentation and SUNDIALS examples.
One new required vector operation and ten new optional vector operations have been added to the NVECTOR API. The new required operation, N_VGetLength, returns the global length of an N_Vector. The optional operations have been added to support the new NVECTOR_MPIMANYVECTOR implementation. The operation N_VGetCommunicator must be implemented by subvectors that are combined to create an NVECTOR_MPIMANYVECTOR, but is not used outside of this context. The remaining nine operations are optional local reduction operations intended to eliminate unnecessary latency when performing vector reduction operations (norms, etc.) on distributed memory systems. The optional local reduction vector operations are N_VDotProdLocal, N_VMaxNormLocal, N_VMinLocal, N_VL1NormLocal, N_VWSqrSumLocal, N_VWSqrSumMaskLocal, N_VInvTestLocal, N_VConstrMaskLocal, and N_VMinQuotientLocal. If an NVECTOR implementation defines any of the local operations as NULL, then the NVECTOR_MPIMANYVECTOR will call standard NVECTOR operations to complete the computation.
The *_MPICuda and *MPIRaja functions have been removed from the NVECTORCUDA and NVECTOR_RAJA implementations respectively. Accordingly, the nvector_mpicuda.h, nvector_mpiraja.h, libsundials_nvecmpicuda.lib, and libsundials_nvecmpicudaraja.lib files have been removed. Users should use the NVECTOR_MPIPLUSX module in conjunction with the NVECTOR_CUDA or NVECTOR_RAJA modules to replace the functionality. The necessary changes are minimal and should require few code modifications.
Fixed a memory leak in the NVECTOR_PETSC clone function.
Made performance improvements to the CUDA NVECTOR. Users who utilize a non -default stream should no longer see default stream synchronizations after memory transfers.
Added a new constructor to the CUDA NVECTOR that allows a user to provide custom allocate and free functions for the vector data array and internal reduction buffer.
Added new Fortran 2003 interfaces for most NVECTOR modules. See NEVTOR section in the user guides for more details on how to use the interfaces.
Added three new NVECTOR utility functions, FN_VGetVecAtIndexVectorArray, FN_VSetVecAtIndexVectorArray, and FN\_VNewVectorArray, for working with N_Vector arrays when using the Fortran 2003 interfaces.
SUNMatrix
Two new functions were added to aid in creating custom SUNMATRIX objects. The constructor SUNMatNewEmpty() allocates an ``empty'' generic SUNMATRIX with the object's content pointer and the function pointers in the operations structure initialized to NULL. When used in the constructor for custom objects this function will ease the introduction of any new optional operations to the SUNMATRIX API by ensuring only required operations need to be set. Additionally, the function SUNMatCopyOps(A, B) has been added to copy the operation function pointers between matrix objects. When used in clone routines for custom matrix objects these functions also will ease the introduction of any new optional operations to the SUNMATRIX API by ensuring all operations are copied when cloning objects.
A new operation, SUNMatMatvecSetup, was added to the SUNMatrix API. Users who have implemented custom SUNMatrix modules will need to at least update their code to set the corresponding ops structure member, matvecsetup, to NULL.
The generic SUNMatrix API now defines error codes to be returned by SUNMatrix operations. Operations which return an integer flag indicating success/failure may return different values than previously.
A new SUNMatrix (and SUNLinearSolver) implementation was added to facilitate the use of the SuperLU_DIST library with SUNDIALS.
Added new Fortran 2003 interfaces for most SUNMATRIX modules. See SUNMATRIX section in the user guides for more details on how to use the interfaces.
SUNLinearSolver
A new function was added to aid in creating custom SUNLINEARSOLVER objects. The constructor SUNLinSolNewEmpty() allocates an ``empty'' generic SUNLINEARSOLVER with the object's content pointer and the function pointers in the operations structure initialized to NULL. When used in the constructor for custom objects this function will ease the introduction of any new optional operations to the SUNLINEARSOLVER API by ensuring only required operations need to be set.
The return type of the SUNLinearSolver API function SUNLinSolLastFlag has changed from long int to sunindextype to be consistent with the type used to store row indices in dense and banded linear solver modules.
Added a new optional operation to the SUNLINEARSOLVER API, SUNLinSolGetID, that returns a SUNLinearSolver_ID for identifying the linear solver module.
The SUNLinearSolver API has been updated to make the initialize and setup functions optional.
A new SUNLinearSolver (and SUNMatrix) implementation was added to facilitate the use of the SuperLU_DIST library with SUNDIALS.
Added a new SUNLinearSolver implementation, SUNLinearSolver_cuSolverSp_batchQR, which leverages the NVIDIA cuSOLVER sparse batched QR method for efficiently solving block diagonal linear systems on NVIDIA GPUs.
Added three new accessor functions to the SUNLinSol_KLU module, SUNLinSol_KLUGetSymbolic(), SUNLinSol_KLUGetNumeric(), and SUNLinSol_KLUGetCommon(), to provide user access to the underlying KLU solver structures.
Added new Fortran 2003 interfaces for most SUNLINEARSOLVER modules. See SUNLINEARSOLVER section in the user guides for more details on how to use the interfaces.
SUNNonlinearSolver
A new function was added to aid in creating custom SUNNONLINEARSOLVER objects. The constructor SUNNonlinSolNewEmpty() allocates an ``empty'' generic SUNNONLINEARSOLVER with the object's content pointer and the function pointers in the operations structure initialized to NULL. When used in the constructor for custom objects this function will ease the introduction of any new optional operations to the SUNNONLINEARSOLVER API by ensuring only required operations need to be set.
To facilitate the use of user supplied nonlinear solver convergence test functions the SUNNonlinSolSetConvTestFn function in the SUNNonlinearSolver API has been updated to take a void* data pointer as input. The supplied data pointer will be passed to the nonlinear solver convergence test function on each call.
The inputs values passed to the first two inputs of the SUNNonlinSolSolve function in the SUNNONLINEARSOLVER have been changed to be the predicted state and the initial guess for the correction to that state. Additionally, the definitions of SUNNonlinSolLSetupFn and SUNNonlinSolLSolveFn in the SUNNonlinearSolver API have been updated to remove unused input parameters. For more information on the nonlinear system formulation and the API functions see the SUNNONLINEARSOLVER chapter in the user guides.
Added a new SUNNonlinearSolver implementation, SUNNonlinsol_PetscSNES, which interfaces to the PETSc SNES nonlinear solver API.
Added new Fortran 2003 interfaces for most SUNNONLINEARSOLVER modules. See SUNNONLINEARSOLVER section in the user guides for more details on how to use the interfaces.
CVODE and CVODES
Fixed a bug in the CVODE and CVODES constraint handling where the step size could be set below the minimum step size.
Fixed a bug in the CVODE and CVODES nonlinear solver interfaces where the norm of the accumulated correction was not updated when using a non-default convergence test function.
Fixed a bug in the CVODES cvRescale function where the loops to compute the array of scalars for the fused vector scale operation stopped one iteration early.
Fixed a bug in CVODES where CVodeF would return the wrong flag under certain circumstances.
Fixed a bug in CVODES where CVodeF would not return a root in NORMAL_STEP mode if the root occurred after the desired output time.
Fixed a memory leak in FCVODE when not using the default nonlinear solver.
Removed extraneous calls to N_VMin() for simulations where the scalar valued absolute tolerance, or all entries of the vector-valued absolute tolerance array, are strictly positive. In this scenario CVODE and CVODES will remove at least one global reduction per time step.
The CVLS interface has been updated to only zero the Jacobian matrix before calling a user-supplied Jacobian evaluation function when the attached linear solver has type SUNLINEARSOLVER_DIRECT.
A new linear solver interface function, CVLsLinSysFn, was added as an alternative method for evaluating the linear systems I - gamma J.
Added functions to get the current state and gamma value to CVODE and CVODES. These functions may be useful to users who chose to provide their own nonlinear solver implementation.
Added New Fortran 2003 interfaces to CVODE and CVODES were added. These new interfaces were generated with SWIG-Fortran and provide a user an idiomatic Fortran 2003 interface to most of the SUNDIALS C API. The existing CVODE F2003 interface, and all module implementations with existing Fortran 2003 interfaces were updated accordingly. See the section "Using CVODE for Fortran Applications" and "Using CVODES for Fortran Applications" in the appropriate user guide for more details on how to use the interfaces.
ARKode
The MRIStep module has been updated to support explicit, implicit, or IMEX methods as the fast integrator using the ARKStep module. As a result some function signatures have been changed including MRIStepCreate which now takes an ARKStep memory structure for the fast integration as an input.
Fixed a bug in the ARKStep time-stepping module in ARKode that would result in an infinite loop if the nonlinear solver failed to converge more than the maximum allowed times during a single step.
Fixed a bug in ARKode that would result in a "too much accuracy requested" error when using fixed time step sizes with explicit methods in some cases.
Fixed a bug in ARKStep where the mass matrix linear solver setup function was not called in the Matrix-free case.
Fixed a minor bug in ARKStep where an incorrect flag is reported when an error occurs in the mass matrix setup or Jacobian-vector product setup functions.
Fixed a memory leak in FARKODE when not using the default nonlinear solver.
The reinitialization functions ERKStepReInit(), ARKStepReInit(), and MRIStepReInit() have been updated to retain the minimum and maximum step size values from before reinitialization rather than resetting them to the default values.
Removed extraneous calls to N_VMin() for simulations where the scalar valued absolute tolerance, or all entries of the vector-valued absolute tolerance array, are strictly positive. In this scenario ARKode steppers will remove at least one global reduction per time step.
The ARKLS interface has been updated to only zero the Jacobian matrix before calling a user-supplied Jacobian evaluation function when the attached linear solver has type SUNLINEARSOLVER_DIRECT.
A new linear solver interface function, ARKLsLinSysFn, was added as an alternative method for evaluating the linear systems M - gamma J and I - gamma J.
Added two new embedded ARK methods of orders 4 and 5 to ARKode (from Kennedy & Carpenter, Appl. Numer. Math., 136:183--205, 2019).
Support for optional inequality constraints on individual components of the solution vector has been added the ARKode ERKStep and ARKStep modules. See the descriptions of ERKStepSetConstraints and ARKStepSetConstraints for more details. Note that enabling constraint handling requires the NVECTOR operations N_VMinQuotient, N_VConstrMask, and N_VCompare that were not previously required by ARKode.
Added functions to get the current state and gamma value to the ARKStep module. These functions may be useful to users who chose to provide their own nonlinear solver implementation.
Add two new 'Set' functions to MRIStep, MRIStepSetPreInnerFn() and MRIStepSetPostInnerFn() for performing communication or memory transfers needed before or after the inner integration.
Added new Fortran 2003 interfaces to all ARKode stepper modules. These new interfaces were generated with SWIG-Fortran and provide a user an idiomatic Fortran 2003 interface to most of the SUNDIALS C API. See the section "Using ARKode for Fortran Applications" in the user guide for more details on how to use the interfaces.
IDA and IDAS
A bug was fixed in the IDA and IDAS linear solver interfaces where an incorrect Jacobian-vector product increment was used with iterative solvers other than SPGMR and SPFGMR.
Fixed a bug in IDAS where IDASolveF would return the wrong flag under certain circumstances.
Fixed a bug in IDAS where IDASolveF would not return a root in NORMAL_STEP mode if the root occurred after the desired output time.
Fixed a bug the IDAS IDAQuadReInitB function where an incorrect memory structure was passed to IDAQuadReInit.
Fixed a memory leak in FIDA when not using the default nonlinear solver.
Removed extraneous calls to N_VMin() for simulations where the scalar valued absolute tolerance, or all entries of the vector-valued absolute tolerance array, are strictly positive. In this scenario IDA and IDAS will remove at least one global reduction per time step.
The IDALS interface has been updated to only zero the Jacobian matrix before calling a user-supplied Jacobian evaluation function when the attached linear solver has type SUNLINEARSOLVER_DIRECT.
Added new Fortran 2003 interfaces to IDA and IDAS. These new interfaces were generated with SWIG-Fortran and provide a user an idiomatic Fortran 2003 interface to most of the SUNDIALS C API. See the section "Using IDA for Fortran Applications" and "Using IDAS for Fortran Applications" in the appropriate user guide for more details on how to use the interfaces.
KINSOL
Fixed a bug in the KINSOL linear solver interface where the auxiliary scalar sJpnorm was not computed when necessary with the Picard iteration and the auxiliary scalar sFdotJp was unnecessarily computed in some cases.
The KINLS interface has been updated to only zero the Jacobian matrix before calling a user-supplied Jacobian evaluation function when the attached linear solver has type SUNLINEARSOLVER_DIRECT.
Added new Fortran 2003 interfaces to KINSOL. These new interfaces were generated with SWIG-Fortran and provide a user an idiomatic Fortran 2003 interface to most of the SUNDIALS C API. See the section "Using KINSOL for Fortran Applications" for more details on how to use the interfaces.
Changes in minor release SUNDIALS v4.1.0
An additional N_Vector implementation was added for Tpetra vector from Trilinos library to facilitate interoperability between SUNDIALS and Trilinos. This implementation is accompanied by additions to user documentation and SUNDIALS examples.
A bug was fixed where a nonlinear solver object could be freed twice in some use cases.
The EXAMPLES_ENABLE_RAJA CMake option has been removed. The option EXAMPLES_ENABLE_CUDA enables all examples that use CUDA including the RAJA examples with a CUDA back end (if the RAJA NVECTOR is enabled).
The implementation header files (e.g. arkode_impl.h) are no longer installed. This means users who are directly manipulating package memory structures will need to update their code to use the package's public API.
Python is no longer required to run make test and make test_install.
Fixed a bug in ARKodeButcherTable_Write when printing a Butcher table without an embedding.
Changes in patch release SUNDIALS v4.0.2
Added information about how to contribute to SUNDIALS as well as a contributor agreement.
Moved definitions of DLS and SPILS backwards compatibility functions to a source file. The symbols are now included in the appropriate package library, e.g. libsundials_cvode.lib.
Changes in patch release SUNDIALS v4.0.1
A bug in ARKode where single precision builds would fail to compile has been fixed.
Changes in major release SUNDIALS v4.0.0
The direct and iterative linear solver interfaces in all SUNDIALS packages have been merged into unified linear solver interfaces for each package that support any valid SUNLINSOL module. This includes the previous DIRECT and ITERATIVE types and the new MATRIX_ITERATIVE type. Details regarding how SUNDIALS packages utilize linear solvers of each type as well as discussion regarding intended use cases for user-supplied SUNLINSOL implementations are included in the SUNLINSOL chapter of the user guides.
The unified interfaces are very similar to the previous DLS and SPILS interfaces. To minimize challenges in user migration to the unified linear solver interfaces, the previous DLS and SPILS routines for all packages may still be used; these will be deprecated in future releases, so we recommend that users migrate to the new names soon. Additionally, we note that Fortran users will need to enlarge their iout array of optional integer outputs, and update the indices that they query for certain linear-solver-related statistics.
The names of all constructor routines for SUNDIALS-provided SUNLinSol implementations have been updated to follow the naming convention SUNLinSol_* where * is the name of the linear solver e.g., Dense, KLU, SPGMR, PCG, etc. Solver-specific ``set'' routine names have been similarly standardized. To minimize challenges in user migration to the new names, the previous routine names may still be used; these will be deprecated in future releases, so we recommend that users migrate to the new names soon.
SUNDIALS integrators (ARKode, CVODE, CVODES, IDA, and IDAS) have been updated to utilize generic nonlinear solver modules through the SUNNONLINSOL API. This API will ease the addition of new nonlinear solver options and allow for external or user-supplied nonlinear solvers. The SUNNONLINSOL API and provided SUNNONLINSOL modules are described in a new user guide chapter and follow the same object oriented design and implementation used by the NVECTOR, SUNMATRIX, and SUNLINSOL modules.
With the introduction of SUNNonlinSol modules, the input parameter iter to CVodeCreate has been removed along with the function CVodeSetIterType and the constants CV_NEWTON and CV_FUNCTIONAL. Similarly, the ITMETH parameter has been removed from the Fortran interface function FCVMALLOC. Instead of specifying the nonlinear iteration type when creating the CVODE(S) memory structure, CVODE(S) uses the SUNNONLINSOL_NEWTON module implementation of a Newton iteration by default.For details on using a non-default or user-supplied nonlinear solver see the “Using CVODE[S] for ..." chapters in the user guides. CVODE(S) functions for setting the nonlinear solver options (e.g., CVodeSetMaxNonlinIters) or getting nonlinear solver statistics (e.g., CVodeGetNumNonlinSolvIters) remain unchanged and internally call generic SUNNonlinSol functions as needed.
By default IDA(S) uses the SUNNONLINSOL_NEWTON module. Since IDA(S) previously only used an internal implementation of a Newton iteration no changes are required to user programs and functions for setting the nonlinear solver options (e.g., IDASetMaxNonlinIters) or getting nonlinear solver statistics (e.g., IDAGetNumNonlinSolvIters) remain unchanged and internally call generic SUNNonlinSol functions as needed. While SUNDIALS includes a fixed-point nonlinear solver module, it is not currently supported in IDA(S).For details on using a non-default or user-supplied nonlinear solver see the “Using IDA[S] for ..." chapters in the user guides. Additionally, the example program idaRoberts_dns.c explicitly creates an attaches a SUNNONLINSOL_NEWTON object to demonstrate the process of creating and attaching a nonlinear solver module (note this is not necessary in general as IDA uses the SUNNONLINSOL_NEWTON module by default).
Three fused vector operations and seven vector array operations have been added to the NVECTOR API. These optional operations are disabled by default and may be activated by calling vector specific routines after creating an NVECTOR. See the NVECTOR chapter in the user guides for more information on the new operations.
Added a new NVECTOR (NVECTOR_OPENMPDEV) which leverages OpenMP 4.5+ device offloading.
Multiple updates to the CUDA NVECTOR were made:
- Changed the N_VMake_Cuda function to take a host data pointer and a device data pointer instead of an N_VectorContent_Cuda object.
- Changed N_VGetLength_Cuda to return the global vector length instead of the local vector length.
- Added N_VGetLocalLength_Cuda to return the local vector length.
- Added N_VGetMPIComm_Cuda to return the MPI communicator used.
- Removed the accessor functions in the namespace suncudavec.
- Added the ability to set the cudaStream_t used for execution of the CUDA NVECTOR kernels. See the function N_VSetCudaStreams_Cuda.
- Added N_VNewManaged_Cuda, N_VMakeManaged_Cuda, and N_VIsManagedMemory_Cuda functions to accommodate using managed memory with the CUDA NVECTOR.
Multiple updates to the RAJA NVECTOR were made:
- Changed N_VGetLength_Raja to return the global vector length instead of the local vector length.
- Added N_VGetLocalLength_Raja to return the local vector length.
- Added N_VGetMPIComm_Raja to return the MPI communicator used.
- Removed the accessor functions in the namespace sunrajavec.
The SUNBandMatrix constructor has been simplified to remove the storage upper bandwidth argument.
Two changes were made in the CVODE/CVODES/ARKODE initial step size algorithm:
- Fixed an efficiency bug where an extra call to the RHS function was made.
- Changed the behavior of the algorithm if the max-iterations case is hit. Before the algorithm would exit with the step size calculated on the penultimate iteration. Now it will exit with the step size calculated on the final iteration.
Fortran 2003 interfaces to CVODE, the fixed-point and Newton nonlinear solvers, the dense, band, KLU, PCG, SPBCGS, SPFGMR, SPGMR, and SPTFQMR linear solvers, and the serial, PThreads, and OpenMP NVECTORs have been added.
The ARKode library has been entirely rewritten to support a modular approach to one-step methods, which should allow for rapid research and development of novel integration methods without affecting existing solver functionality.
A new ARKode stepper, MRIStep, has been added for two rate explicit-explicit multirate infinitesimal step methods.
ARKode's dense output infrastructure has been improved to support higher-degree Hermite polynomial interpolants (up to degree 5) over the last successful time step.
Changes in patch release SUNDIALS v3.2.1
- Fixed a bug in the CUDA NVector where the N_VInvTest operation could write beyond the allocated vector data
- Fixed library installation path for multiarch systems. This fix changes the default library installation path to CMAKE_INSTALL_PREFIX/CMAKE_INSTALL_LIBDIR from CMAKE_INSTALL_PREFIX/lib. CMAKE_INSTALL_LIBDIR is automatically set, but is available as a CMAKE option that can modified.
Changes in minor release SUNDIALS v3.2.0
- Added hybrid MPI/CUDA and MPI/RAJA vectors to allow use of more than one MPI rank when using a GPU system. The vectors assume one GPU device per MPI rank.
- Changed the name of the RAJA NVector library to libsundials\nveccudaraja\lib from libsundials\nvecraja\lib to better reflect that we only support CUDA as a backend for RAJA currently.
- Increased CMake minimum version to 3.1.3
- Several changes were made to the build system.
- If MPI is enabled and MPI compiler wrappers are not set, the build system will check if CMAKE_<language>_COMPILER can compile MPI programs before trying to locate and use an MPI installation.
- The native CMake FindMPI module is now used to locate an MPI installation.
- The options for setting MPI compiler wrappers and the executable for running MPI programs have been updated to align with those in the native CMake FindMPI module. This update included changing MPI_MPICC to MPI_C_COMPILER, MPI_MPICXX to MPI_CXX_COMPILER, combining MPI_MPIF77 and MPI_MPIF90 to MPI_Fortran_COMPILER, and changing MPI_RUN_COMMAND to MPIEXEC.
- When a Fortran name-mangling scheme is needed (e.g., LAPACK_ENABLE is ON) the build system will infer the scheme from the Fortran compiler. If a Fortran compiler is not available or the inferred or default scheme needs to be overridden, the advanced options SUNDIALS_F77_FUNC_CASE and SUNDIALS_F77_FUNC_UNDERSCORES can be used to manually set the name-mangling scheme and bypass trying to infer the scheme.
- Additionally, parts of the main CMakeLists.txt file were moved to new files in the src and example directories to make the CMake configuration file structure more modular.
- In CVODE:
- Added constraint handling.
- In CVODES:
- Fixed a thread-safety issue when using adjoint sensitivity analysis (thank you to Joris Gillis for informing us of this issue)
- Added constraint handling.
- In IDAS:
- Fixed a thread-safety issue when using adjoint sensitivity analysis (thank you to Joris Gillis for informing us of this issue)
- Fixed a bug where the saved residual value used in the nonlinear solve for consistent initial conditions was passed as temporary workspace and could be overwritten.
Changes in minor release SUNDIALS v3.1.2
- Updated the minimum required version of CMake to 2.8.12 and enabled using rpath by default to locate shared libraries on OSX.
- Fixed Windows specific problem where 'sunindextype' was not correctly defined when using 64-bit integers for the SUNDIALS index type. On Windows 'sunindextype' is now defined as the MSVC basic type '__int64'
- Added sparse SUNMatrix ``Reallocate'' routine to allow specification of the nonzero storage.
- Updated the KLU SUNLinearSolver module to set constants for the two reinitialization types, and fixed a bug in the full reinitialization approach where the sparse SUNMatrix pointer would go out of scope on some architectures.
- Updated the ``ScaleAdd'' and ``ScaleAddI'' implementations in the sparse SUNMatrix module to more optimally handle the case where the target matrix contained sufficient storage for the sum, but had the wrong sparsity pattern. The sum now occurs in-place, by performing the sum backwards in the existing storage. However, it is still more efficient if the user-supplied Jacobian routine allocates storage for the sum 'I+ gamma J' manually (with zero entries if needed).
- Changed the LICENSE install path to 'instdir/include/sundials'.
- In CVODE:
- Added the following examples from the usage notes page of the SUNDIALS website, and updated them to work with SUNDIALS 3.x:
- 'cvDisc_dns.c', which demonstrates using CVODE with discontinuous solutions or RHS.
- 'cvRoberts_dns_negsol.c', which illustrates the use of the RHS function return value to control unphysical negative concentrations.
- Added the following examples from the usage notes page of the SUNDIALS website, and updated them to work with SUNDIALS 3.x:
- In CVODES:
- The misnamed function CVSpilsSetJacTimesSetupFnBS in cvodes has been deprecated and replaced by CVSpilsSetJacTimesBS. The deprecated function CVSpilsSetJacTimesSetupFnBS will be removed in the next major release.
Changes in minor release SUNDIALS v3.1.1
- Fixed a potential memory leak in the SPGMR and SPFGMR linear solvers: if "Initialize" was called multiple times then the solver memory was reallocated (without being freed).
- Fixed C++11 compiler errors/warnings about incompatible use of string literals.
- Updated KLU SUNLinearSolver module to use a typedef for the precision-specific solve function to be used (to avoid compiler warnings).
- Added missing typecasts for some (void*) pointers (again, to avoid compiler warnings).
- Bugfix in sunmatrix_sparse.c where we had used 'int' instead of 'sunindextype' in one location.
- Added missing #include <stdio.h> in NVECTOR and SUNMATRIX header files.
- Fixed an indexing bug in the CUDA NVECTOR implementation of N_VWrmsNormMask and revised the RAJA NVECTOR implementation of N_VWrmsNormMask to work with mask arrays using values other than zero or one. Replaced doubles with realtypes in the RAJA vector test functions.
- Fixed compilation issue with GCC 7.3.0 and Fortran programs that do not require a SUNMatrix or SUNLinearSolver module (e.g., iterative linear solvers, explicit methods in ARKode, functional iteration in CVODE, etc.).
- In ARKode:
- Fixed a minor bug in the ARKReInit routine, where a flag was incorrectly set to indicate that the problem had been resized (instead of just re-initialized).
- Added missing prototype for ARKSpilsGetNumMTSetups.
- In IDA and IDAS
- Added missing prototypes for IDASpilsGetNumJTSetupEvals in IDA and IDAS.
- In CVODE and CVODES:
- Fixed a minor bug in the CVODE and CVODES cvSLdet routine, where a return was missing in the error check for three inconsistent roots.
- In KINSOL:
- Fixed a minor bug in KINPrintInfo where a case was missing for KIN_REPTD_SYSFUNC_ERR leading to an undefined info message.
Changes in major release SUNDIALS v3.1.0
- New features and/or enhancements
- Added NVECTOR print functions that write vector data to a specified file (e.g., N_VPrintFile_Serial).
- Added 'make test' and 'make test_install' options to the build system for testing SUNDIALS after building with 'make' and installing with 'make install' respectively.
- Added "Changes in ..." (latest version) to Intro. in all User Guides.
Changes in major release SUNDIALS v3.0.0
- New features and/or enhancements
- New linear solver API and interfaces for all SUNDIALS packages and linear solvers. The goal of the redesign of these interfaces was to provide more encapsulation and ease in interfacing custom linear solvers and interoperability with linear solver libraries.
- Added generic SUNMATRIX module with three provided implementations: dense, banded, and sparse. These implementations replicate previous SUNDIALS Dls and Sls matrix structures in a single object-oriented API.
- Added example problems demonstrating use of generic SUNMATRIX modules.
- Added generic SUNLINEARSOLVER module with eleven provided implementations: dense, banded, LAPACK dense, LAPACK band, KLU, SuperLU_MT, SPGMR, SPBCGS, SPTFQMR, SPFGMR, and PCG. These implementations replicate previous SUNDIALS generic linear solvers in a single object-oriented API.
- Added example problems demonstrating use of generic SUNLINEARSOLVER modules.
- Expanded package-provided direct linear solver (Dls) interfaces and scaled, preconditioned, iterative linear solver (Spils) interfaces to utilize generic SUNMATRIX and SUNLINEARSOLVER objects.
- Removed package-specific, linear solver-specific, solver modules (e.g. CVDENSE, KINBAND, IDAKLU, ARKSPGMR) since their functionality is entirely replicated by the generic Dls/Spils interfaces and SUNLINEARSOLVER/SUNMATRIX modules. The exception is CVDIAG, a diagonal approximate Jacobian solver available to CVODE and CVODES.
- Converted all SUNDIALS example problems to utilize new generic SUNMATRIX and SUNLINEARSOLVER objects, along with updated Dls and Spils linear solver interfaces.
- Added Spils interface routines to ARKode, CVODE, CVODES, IDA and IDAS to allow specification of a user-provided "JTSetup" routine. This change supports users who wish to set up data structures for the user-provided Jacobian-times-vector ("JTimes") routine, and where the cost of one JTSetup setup per Newton iteration can be amortized between multiple JTimes calls.
- Two new NVECTOR modules added: for CUDA and RAJA support for GPU systems. These vectors are supplied to provide very basic support for running on GPU architectures. Users are advised that these vectors both move all data to the GPU device upon construction, and speedup will only be realized if the user also conducts the right-hand-side function evaluation on the device. In addition, these vectors assume the problem fits on one GPU. For further information about RAJA, users are referred to the web site, https://raja.readthedocs.io/en/main/.
- Addition of sunindextype option for 32- or 64-bit integer data index types within all SUNDIALS structures.
- Sunindextype can be int64_t or int32_t or long long int and int depending on machine support for portable types.
- The Fortran interfaces continue to use long_int for indices, except for their sparse matrix interface that now uses the new sunindextype.
- Includes interfaces to PETSc, hypre, SuperLU_MT, and KLU with either 64-bit or 32-bit capabilities depending how the user configures SUNDIALS.
- Temporary vectors were removed from preconditioner setup and solve routines for all packages. It is assumed that all necessary data for user-provided preconditioner operations will be allocated and stored in user-provided data structures.
- The file include/sundials_fconfig.h was added. This file contains SUNDIALS type information for use in Fortran programs.
- Added support for many xSDK-compliant build system keys.
- The xSDK is a movement in scientific software to provide a foundation for the rapid and efficient production of high-quality, sustainable extreme-scale scientific applications.
- More information can be found at https://xsdk.info.
- Added functions SUNDIALSGetVersion and SUNDIALSGetVersionNumber to get SUNDIALS release version information at runtime.
- To avoid potential namespace conflicts, the macros defining booleantype values TRUE and FALSE have been changed to SUNTRUE and SUNFALSE respectively.
- In build system:
- Added separate BLAS_ENABLE and BLAS_LIBRARIES CMake variables.
- Additional error checking during CMake configuration.
- Fixed minor CMake bugs.
- Renamed CMake options to enable/disable examples for greater clarity and added option to enable/disable Fortran 77 examples:
- Changed EXAMPLES_ENABLE to EXAMPLES_ENABLE_C.
- Changed CXX_ENABLE to EXAMPLES_ENABLE_CXX.
- Changed F90_ENABLE to EXAMPLES_ENABLE_F90.
- Added EXAMPLES_ENABLE_F77 option.
- Corrections and additions to all User Guides.
- New linear solver API and interfaces for all SUNDIALS packages and linear solvers. The goal of the redesign of these interfaces was to provide more encapsulation and ease in interfacing custom linear solvers and interoperability with linear solver libraries.
- In ARKode:
- Added comments to arkode_butcher.c regarding which methods should have coefficients accurate enough for use in quad precision.
- Bug Fix: Fixed a bug in arkode_butcher.c in use of RCONST.
- Bug Fix: Fixed a bug in the arkInitialSetup utility routine in the order of operations when setting up and using mass matrices to ensure the mass matrix vector product is set up before the "msetup" routine is called.
- Fixed ARKode printf-related compiler warnings when building SUNDIALS with extended precision.
- In CVODE/CVODES:
- In CVodeFree, now call lfree() unconditionally (if non-NULL).
- In IDA/IDAS:
- Bug Fix: Added missing prototype for IDASetMaxBacksIC in ida.h and idas.h.
- In KINSOL:
- Bug Fix: Corrected KINSOL fcmix name translation for FKIN_SPFGMR.
Changes in major release SUNDIALS v2.7.0
- Two new NVECTOR modules added: for hypre ParVector and PETSC.
- In vector API, added new required function, N_VGetVectorID.
- Upgrades to sparse solver interfaces; now support CSR matrix type with KLU solver.
- In all packages, example codes were changed from using NV_DATA macro to using N_VGetArrayPointer_* when using the native vectors shipped with SUNDIALS
- In all packages, fixed memory leak in banded preconditioner interface.
- Fixed some examples w.r.t. switch to new macro/function names SUNRexp etc.
- Various minor fixes to installation-related files.
- Corrected name N_VCloneEmptyVectorArray to N_VCloneVectorArrayEmpty in all documentation files.
- Updated all packages to return integers from linear solver and preconditioner 'free' functions.
- Removed Matlab interface from distribution as it has not been updated since 2009. We expect to update this interface soon.
- In FKINSOL, FCVODE, and FIDA, added missing Fortran interface routines so that users can supply the sparse Jacobian routine.
- Minor corrections and additions to all User Guides, including removal of references to specific NVECTOR names in usage skeletons.
- Additional example programs added throughout.
- In CVODE
- in FCVODE, fixed argument order bugs in FCVKLU and FCVSUPERLUMT linear solver interfaces.
- In CVODES
- changed each **FreeB() to type int; added return(0) to each.
- in interpolation routines for backward problems, added logic to bypass sensitivity interpolation if input sensitivity argument is NULL.
- In ARKODE
- updated linear and mass matrix solvers so that 'free' routines return integer instead of void; updated documentation accordingly.
- fixed initialization of linear solver performance counters.
- method and embedding for Billington and TRBDF2 explicit Runge-Kutta methods were swapped.
- fix for user specification of absolute tolerance array along with vector Resize() functionality.
- fix for user-supplied Butcher tables without embeddings (if fixed time steps or manual adaptivity are employed).
- multiple documentation updates.
- added missing ARKSpilsGetNumMtimesEvals() function.
- implicit predictor algorithms were updated: methods 2 and 3 were improved, a new predictor approach was added, and the default choice was modified.
- revised handling of integer codes for specifying built-in Butcher tables: a global numbering system is still used, but methods now have #defined names to simplify the user interface.
- maximum number of Butcher table stages was increased from 8 to 15 to accommodate very high-order methods, and an 8th-order adaptive ERK method was added.
- added support for the explicit and implicit methods in an additive Runge-Kutta method to utilize different stage times, solution and embedding coefficients, to support new SSP-ARK methods.
- extended FARKODE interface to include a routine to set scalar/array-valued residual tolerances, to support Fortran applications with non-identity mass-matrices.
- In IDA
- corrected example idaFoodWeb_bnd.c in PrintOutput (wrong component printed).
- added optional input function IDASetMaxBacksIC to limit number of linesearch backtrack operations in IDACalcIC. User guides amended accordingly.
- In IDAS
- added optional input function IDASetMaxBacksIC to limit number of linesearch backtrack operations in IDACalcIC. User guides amended accordingly.
- changed each **FreeB() to type int; added return(0) to each.
- in interpolation routines for backward problems, added logic to bypass sensitivity interpolation if input sensitivity argument is NULL.
- In KINSOL
- minor bug fix in Picard iteration.
- minor bug fix in line search to prevent infinite loop when beta condition fails and lambda is below minimum size.
Changes in minor release SUNDIALS v2.6.2
- In IDAS, added missing backward problem support functions: IDALapackDenseB, IDALapackDenseFreeB, IDALapackBandB, IDALapackBandFreeB
- In KINSOL and ARKode, updated Anderson acceleration implementation with QR updating.
- Updated BiCGStab solver to remove redundant dot product call.
- Minor corrections and additions to all User Guides.
- In CVODES and IDAS header files, corrected documentation of backward integration functions, especially the 'which' argument.
- In CVODES, added DVKLUB prototype and corrected CVSuperLUMTB prototype.
- In IDAS, made SuperLUMT call for backward problem consistent with CVODES.
- In CVODES and IDAS, added ReInit and SetOrdering wrappers for backward problems. Fixed potential memory leak in KLU ReInit functions in all solvers.
- In CVODE, IDA, and ARKode, fixed Fortran interfaces to enable calls to *GetErrWeights, *GetEstLocalErrors, and *GetDky within a time step. In ARKode, fixed a bug in one Butcher table.
- In ARKode, fixed error in arkDoErrorTest in recovery after failure.
- In IDAS, fixed for-loop bugs in IDAAckpntAllocVectors Various minor fixes to installation-related files.
Summary of changes in minor release SUNDIALS v2.6.1
- Fixed loop limit bug in SlsAddMat function.
- In all six solver interfaces to KLU and SuperLUMT, added #include lines, and removed redundant KLU structure allocations.
- Numerous minor documentation improvements
- Minor bug fixes in ARKode
Summary of major changes in SUNDIALS v2.6.0
- Addition of ARKode package of explicit, implicit, and additive Runge-Kutta methods for ODES. This package API is close to CVODE so switching between the two should be straightforward. Thanks go to Daniel Reynolds for the addition of this package.
- Addition of support for two sparse direct solver packages when using the serial vector structure, KLU and SuperLU_MT. exploits highly sparse systems. SuperLU_MT supports multithreading in the factorization.
- Addition of openMP and PThreads vector kernels.
- Addition of fixed point and Picard iterative solvers within KINSOL. These are both optionally accelerated with Anderson acceleration.
- Addition of FGMRES support for KINSOL.
- Removal of autotools configuration support. We now exclusively use CMake.
- Numerous bug fixes throughout.
Summary of major changes in v2.5.0?
- Changes to user interface
- Problem size and related integers (bandwidth parameters etc.) all have type long int, except in BLAS and LAPACK routines. Function NewIntArray is replaced by a pair NewIntArray/NewLintArray, for int and long int arrays, respectively.
Summary of major changes in v2.4.0
- New features
- new linear solver module, based on Blas and Lapack for both dense and banded matrices.
- Changes to user interface
- reorganization of all linear solver modules into two families (besides the existing family of scaled preconditioned iterative linear solvers, the direct solvers, including the new Lapack-based ones, were also organized into a direct family).
- Changes related to the build system
- provide CMake-based build option, in addition to that based on autotools.
Summary of major changes in v2.3.0
- Changes to the user interface
- modified the functions in the generic dense linear solver (sundials_dense and sundials_smalldense) to work for rectangular m by n matrices (m ≤ n).
- renamed the factorization and solution functions in the generic dense linear solver to DenseGETRF/denGETRF and DenseGETRS/denGETRS, respectively.
- renamed the factorization and solution functions in the generic band linear solver to BandGBTRF and BandGBTRS, respectively.
- Changes related to the build system
- rearranged the entire SUNDIALS source tree
- all exported header files are now installed in separate subdirectories of the installation include directory
- header files are included now by specifying the relative path (e.g., #include <sundials/sundials_types.h>)
Summary of major changes in v2.2.0
- New features
- added SPBCG (scaled preconditioned Bi-CGStab) linear solver module
- added SPTFQMR (scaled preconditioned TFQMR) linear solver module
- Changes related to the build system
- updated configure script and Makefiles for Fortran examples to avoid C++ compiler errors (now use CC and MPICC to link only if necessary)
- SUNDIALS shared header files are installed under a sundials subdirectory of the installation include directory
- the shared object files are now linked into each SUNDIALS library rather than into a separate libsundials_shared library
- Changes to the user interface
- added prefix sundials_ to all shared header files
Summary of major changes in v2.1.1
- Changes to the generic NVECTOR module
- N_VCloneEmpty was added to the global vector operations table
Summary of major changes in v2.0.2
- Changes related to the build system
- fixed autoconf-related bug to allow configuration with the PGI Fortran compiler
- modified to use customized detection of the Fortran name mangling scheme (autoconf's AC_F77_WRAPPERS routine is problematic on some platforms)
Summary of major changes in v2.0.1
- Changes related to the build system
- changed order of compiler directives in header files to avoid compilation errors when using a C++ compiler.
- changed method of generating sundials_config.h to avoid potential warnings of redefinition of preprocessor symbols.
Summary of major changes in v2.0
- Changes to the generic NVECTOR module
- removed machEnv, redefined table of vector operations (now contained in the N_Vector structure itself).
- all SUNDIALS functions create new N_Vector variables through cloning, using an N_Vector passed by the user as a template.
- a particular NVECTOR implementation is supposed to provide user-callable constructor and destructor functions.
- removed from structure of vector operations the following functions: N_VNew, N_VNew_S, N_VFree, N_VFree_S, N_VMake, N_VDispose, N_VGetData, N_VSetData, N_VConstrProdPos, and N_VOneMask.
- added in structure of vector operations the following functions: N_VClone, N_VDestroy, N_VSpace, N_VGetArrayPointer, N_VSetArrayPointer, and N_VWrmsNormMask.
- Note that nvec_ser and nvec_par are now separate modules outside the shared SUNDIALS module.
- Changes to the generic linear solvers
- in SPGMR, added a dummy N_Vector argument to be used as a template for cloning.
- in SPGMR, removed N (problem dimension) from argument list of SpgmrMalloc.
- iterative.{c,h} replace iterativ.{c,h}
- modified constant names in iterative.h (preconditioner types are prefixed with 'PREC_').
- changed numerical values for MODIFIED_GS (from 0 to 1) and CLASSICAL_GS (from 1 to 2).
- Changes to sundialsmath submodule
- replaced internal routine for estimation of unit roundoff with definition of unit roundoff from float.h
- modified functions to call appropriate math routines given the precision level specified by the user.
- Changes to sundialstypes submodule
- removed type 'integertype'.
- added definitions for 'BIG_REAL', 'SMALL_REAL', and 'UNIT_ROUNDOFF' using values from float.h based on the precision.
- changed definition of macro RCONST to depend on precision.
cvode release history
cvodes release history
arkode release history
ida release history
idas release history
kinsol release history
sundialsTB
sundialsTB is no longer distributed as of sundials v. 2.7.0 as it has not been updated in many years.
What’s new in v2.5.0?
- Bug fixes
- fixed lines setting etachoice in kimOpts.c
- in cvm.c and idm.c, fixed size of rootsfound array; added lines to free rootsfound and ckpnt arrays when done using each
- What’s new in v2.4.0?
- New Features
- the Matlab interface to IDAS was extended to provide sensitivity analysis capabilities.
- Changes to user interface
- the API for adjoint sensitivity analysis (cvodes and idas) was modified to support simultaneous integration of multiple backward problems.
What’s new in v2.3.0?
- New features
- added Matlab interface to IDA (named idas)
- on platforms which support configure scripts, installation of sundialsTB can now be enabled while configuring SUNDIALS and installed through make and make install (provided a working MEX compiler is found).
- Bug fixes
- the installation script install_STB.m was modified to increase robustness on various platforms (related to path and file names).
- Changes to user interface
- (cvodes) for improved legibility, some of the keys for forward sensitivity optional inputs were renamed.
- (cvodes) removed xaxis type option for the internal monitoring function CVodeMonitor.
What’s new in v2.2.0?
- New features
- modified installation procedure to use a Matlab script
- added sample Matlab startup file
- (cvodes) expanded CVodeMonitor
- (kinsol) added interface to KINSOL's performance monitoring function ('Verbose' option to KINSetOptions)
- Bug fixes
- (cvodes) fixed bug in interface to quadrature integration which was causing a segmentation violation when monitoring was turned on.
- Changes to user interface
- updated to reflect changes to the SUNDIALS libraries in v.2.2.0
- (cvodes) changed the interface for sensitivity analysis (both forward and adjoint) to follow more closely the CVODES calling sequence
- (cvodes) optional inputs for forward sensitivity analysis are now provided through a separate function, CVodeSensSetOptions
- removed NVM mex interface