Releases: LLNL/sundials
SUNDIALS v5.6.0
Changes to SUNDIALS in release 5.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.
SUNDIALS v5.5.0
Changes to SUNDIALS in release 5.5.0
Refactored the SUNDIALS build system. CMake 3.12.0 or newer is now required.
Users will likely see deprecation warnings, but 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 or newer.
SUNDIALS v5.4.0
Changes to SUNDIALS in release 5.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
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 retreived 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.
SUNDIALS minor release v5.3.0
Changes to SUNDIALS in release 5.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 perfomance 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 a new function, CVodeSetMonitorFn
, that takes a user-function
to be called by CVODE after every nst
succesfully completed time-steps.
This is intended to provide a way of monitoring the CVODE statistics
throughout the simulation.
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 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
.
SUNDIALS minor release v5.2.0
Changes to SUNDIALS in release 5.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.
SUNDIALS minor release v5.1.0
Changes to SUNDIALS in release 5.1.0
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.
Fixed a bug in the Fortran 2003 interfaces to the ARKode Butcher table routines and structure.
This includes changing the ARKodeButcherTable
type to be a type(c_ptr)
in Fortran.
Added two utility functions, SUNDIALSFileOpen
and SUNDIALSFileClose
for creating/destroying
file pointers. These are useful when using the Fortran 2003 interfaces.
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.
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.
SUNDIALS major release v5.0.0
Changes to SUNDIALS in release 5.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 NVECTOR_CUDA
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 indiciating 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...
SUNDIALS development release v5.0.0-dev.2
Changes to SUNDIALS in release 5.0.0-dev.2
Added a new optional operation to the SUNLINEARSOLVER API, SUNLinSolGetID
,
that returns a SUNLinearSolver_ID
for identifying the linear solver module.
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.
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 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.
Added functions to get the current state and gamma value to CVODE(S) and ARKode.
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.
The reinitialization functions ERKStepReInit()
, ARKStepReInit()
, and
MRIStepReInit()
have been updated to retain the minimum and maxiumum step
size values from before reinitialization rather than resetting them to the
default values.
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.
A bug was fixed in the IDA(S) linear solver interface where an incorrect
Jacobian-vector product increment was used with iterative solvers other than
SPGMR and SPFGMR.
Fixed a bug in the CVODE(S) nonlinear solver interface where the norm of the
accumulated correction was not updated when using a non-default convergence
test function.
SUNDIALS v5.0.0-dev.1
Summary
Our latest release, v5.0.0-dev.1, is a beta release of the next major SUNDIALS version and offers a preview of what is to come in SUNDIALS. The release includes new Fortran 2003 interface modules that provide Fortran users access to most of the SUNDIALS C API including the CVODE, ARKode, IDA, and KINSOL packages. The release also includes new linear solver interface functions, ARKLsLinSysFn and CVLsLinSysFn, which can be used as alternative methods for evaluating matrices for the linear systems M - gamma J and I - gamma J respectively, a new N_Vector implementation, NVECTOR_MPIPLUSX, which supports the MPI+X paradigm where X is a type of on-node parallelism such as CUDA, and several other improvements and bug fixes. We do not foresee any major API changes occurring between this release and v5.0.0, but various minor improvements are planned.
List of Changes
Several new functions were added to aid in creating custom NVECTOR,
SUNMATRIX, SUNLINEARSOLVER, and SUNNONLINEARSOLVER objects. The constructors
N_VNewEmpty(), SUNMatNewEmpty(), SUNLinSolNewEmpty(), and SUNNonlinSolNewEmpty()
allocate ``empty'' generic NVECTOR, SUNMATRIX, SUNLINEARSOLVER, and
SUNNONLINEARSOLVER objects respectively 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 these functions will ease the introduction
of any new optional operations to the NVECTOR, SUNMATRIX, SUNLINEARSOLVER, or
SUNNONLINEARSOLVER APIs by ensuring only required operations need to be set.
Additionally, the functions N_VCopyOps(w, v) and SUNMatCopyOps(A, B) have been
added to copy the operation function pointers between vector and matrix objects
respectively. When used in clone routines for custom vector and matrix objects
these functions also will ease the introduction of any new optional operations
to the NVECTOR or SUNMATRIX APIs by ensuring all operations are copied when
cloning objects.
New linear solver interface functions ARKLsLinSysFn and CVLsLinSysFn were added
as alternative methods for evaluating the linear systems M - gamma J and
I - gamma J respectively.
Fixed a bug in the build system that prevented the PThreads NVECTOR module from
being built.
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 the NVECTOR_PETSC clone function.
Fixed a memeory leaks in FARKODE, FCVODE, and FIDA when not using the default
nonlinear solver.
Fixed a bug in IDAQuadReInitB where an incorrect memory structure was passed to
IDAQuadReInit.
Added two new embedded ARK methods of orders 4 and 5 to ARKode (from
Kennedy & Carpenter, Appl. Numer. Math., 136:183--205, 2019).
The ManyVector NVECTOR module has been split into two versions: one
that requires MPI (MPIManyVector) and another that does not use
MPI at all (ManyVector). The associated example problems have
been similarly updated to reflect this new structure.
An additional NVECTOR implementation, NVECTOR_MPIPLUSX, was 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.
The *_MPICuda and *_MPIRaja functions were removed from the NVECTOR_CUDA 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 coupled with
the NVECTOR_CUDA or NVECTOR_RAJA to replace the functionality. The necessary changes
are minimal and should require few code modifications.
New Fortran 2003 interfaces to ARKODE, IDA, KINSOL, all generic SUNDIALS types
(i.e. NVECTOR, SUNMATRIX, SUNLINEARSOLVER, SUNNONLINEARSOLVER), and the
NVECTOR_PARALLEL 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 CVODE interface, and all module implementations with existing Fortran 2003 interfaces
were updated accordingly. See the section "Using for Fortran Applications" in
the appropriate user guide for more details on how to use the interfaces.
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(S), IDA(S) and ARKode will remove at least one
global reduction per time step.
v5.0.0-dev.0
Changes to SUNDIALS in release 5.0.0-dev.0
An additional N_Vector implementation, NVECTOR_MANYVECTOR, was
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 section in the user guides for more details).
This implementation is accompanied by additions to user documentation
and SUNDIALS examples.
Eleven new optional vector operations have been added to the N_Vector API to
support the new NVECTOR_MANYVECTOR implementation (see N_Vector chapter is the
user guides for more details). Two of the operations, N_VGetCommunicator and
N_VGetLength, must be implemented by subvectors that are combined to create an
NVECTOR_MANYVECTOR, but are 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 N_Vector implementation defines any of the local
operations as NULL, then the NVECTOR_MANYVECTOR will call standard N_Vector
operations to complete the computation.
Additionally this release includes the following changes:
-
A new SUNMatrix and SUNLinearSolver implementation was added to facilitate
the use of the SuperLU_DIST library with SUNDIALS. -
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 indiciating success/failure may return different
values than previously. -
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.