SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic Equation Solvers

KINSOL

KINSOL is a solver for nonlinear algebraic systems. It includes a Newton-Krylov solver as well as Picard and fixed point solvers, both of which can be accelerated with Anderson acceleration. KINSOL is based on the previous Fortran package NKSOL of Brown and Saad.

KINSOL’s Newton solver employs the Inexact Newton method. As this solver is intended mainly for large systems, four iterative methods are provided to solve the resulting linear systems–GMRES, Bi-CGStab, TFQMR, and FGMRES. These are Krylov methods, implemented with scaling and preconditioning, and can be used with all versions of the NVECTOR module.

For the sake of convenience to users with smaller systems, KINSOL (used with the serial NVECTOR module) also includes direct (dense, banded, and sparse) linear solvers for the linear systems. In this case the nonlinear iteration is a Modified Newton method.

In addition, KINSOL (used with the serial NVECTOR module) also includes interfaces to the sparse direct solvers, KLU, and the multi-threaded sparse solver, SuperLU_MT.

In addition to the basic Krylov method modules, the KINSOL package includes a module called KINBBDPRE, which provides a band-block-diagonal preconditioner for the native MPI parallel vector.

For use with Fortran applications, a set of Fortran/C interface routines, called FKINSOL, is also supplied. These are written in C, but assume that the user calling program and all user-supplied routines are in Fortran

See Software page for download and documentation.

KINSOL Release History

What’s new in v5.0.0?

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.

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.

What’s new in v.4.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.

What’s new in v.4.0.2?

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_kinsol.lib.

What’s new in v.4.0.1?

No changes were made to KINSOL in release v4.0.1.

What’s new in v.4.0.0?

The direct and iterative linear solver interfaces in KINSOL have been merged into a single unified linear solver interface to 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 interface is very similar to the previous DLS and SPILS interfaces. To minimize challenges in user migration to the unified linear solver interface, 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.

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.

What’s new in v.3.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.

What’s new in v.4.0.0-dev.2?

Version 4.0.0-dev.2 is a third step toward the full 4.0.0 release which should be complete by end of 2018. This development release includes all changes from v.3.2.0 in addition to those listed below. The 4.0.0 release will include a full redesign of our nonlinear solver interfaces allowing for encapsulation of the nonlinear solvers and ease in interfacing outside nonlinear solver packages, streamlined linear solver interfaces, a restructuring of the ARKode package to allow for more time stepping options, and addition of a two-reate explicit/explicit integrator.

    • New features and/or enhancements

    ARKode, CVODES, and IDAS have been updated to use the SUNNONLINSOL nonlinear solver API.

    The direct and iterative linear solver interfaces in ARKode, CVODE, IDA, and KINSOL have been merged into a single unified linear solver interface to support any valid SUNLINSOL module. The unified interface is very similar to the previous DLS and SPILS interfaces. To minimize challenges in user migration to the unified linear solver interface, the previous DLS and SPILS routines for CVODE, IDA, and KINSOL 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. T 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. The ARKode library has been entirely rewritten to support a modular approach to one-step methods, which should allow rapid research and development of novel integration methods without affecting existing solver functionality.

    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.

    What’s new in v.3.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.

    What’s new in v.4.0.0-dev.1?

    No changes were made in this package for this development release beyond those listed for v.3.1.2.

    What’s new in v.3.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’.

    What’s new in v.4.0.0-dev?

    Version 4.0.0-dev is a first step toward the full 4.0.0 release which should be complete by end of 2018. This development release includes all changes from v.3.1.1 in addition to those listed below. The 4.0.0 release will include a full redesign of our nonlinear solver interfaces allowing for encapsulation of the nonlinear solvers and ease in interfacing outside nonlinear solver packages.

    • New features and/or enhancements
      • Three fused vector operations and seven vector array operations have been added to the NVECTOR API. These optional operations are intended to increase data reuse in vector operations, reduce parallel communication on distributed memory systems, and lower the number of kernel launches on systems with accelerators. The new operations are N_VLinearCombination, N_VScaleAddMulti, N_VDotProdMulti, N_VLinearCombinationVectorArray, N_VScaleVectorArray, N_VConstVectorArray, N_VWrmsNormVectorArray, N_VWrmsNormMaskVectorArray, N_VScaleAddMultiVectorArray, and N_VLinearCombinationVectorArray. If any of these operations are defined as NULL in an NVECTOR implementation the NVECTOR interface will automatically call standard NVECTOR operations as necessary.   Details on the new operations can be found in the user guide Chapter on the NVECTOR API.
      • 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 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.
        • 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.

    What’s new in v.3.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 KINSOL:
      • Fixed a minor bug in KINPrintInfo where a case was missing for KIN_REPTD_SYSFUNC_ERR leading to an undefined info message.

    What’s new in v.3.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.

    What’s new in 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/master/.
      • 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.
    • Bug fixes
      • Corrected KINSOL fcmix name translation for FKIN_SPFGMR.

    What’s new in v2.9.0?

    • New features and/or enhancements
      • 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.
      • Example codes were changed from using NV_DATA macro to using N_VGetArrayPointer_* when using the native vectors shipped with SUNDIALS.
      • Updated to return integers from linear solver and preconditioner ‘free’ functions.
      • Added FKINCREATE and FKININIT routines to split FKINMALLOC routine into two pieces.  FKINMALLOC remains for backward compatibility, but documentation for it has been removed.
      • Added kinFoodWeb_kry_omp.c OpenMP example.
    • Bug fixes
      • 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.
      • In FKINSOL, added missing Fortran interface routines so that users can supply the sparse Jacobian routine.
      • Minor corrections and additions to User Guide, including removal of references to specific NVECTOR names in usage skeletons.
      • Minor bug fix in Picard iteration so that newest iterate is returned.
      • Minor bug fix in line search to prevent infinite loop when beta condition fails and lambda is below minimum size.

    What’s new in v2.8.0?

    • New features
      • Added fixed-point iteration and Picard iteration as globalization strategy options, both with Anderson acceleration.
      • Added interface to the sparse direct solver KLU.
      • Added interface to SuperLU_MT.
      • Added interface to FGMRES.
    • Bug fixes
      • Corrected two return values in function KINStop.
      • Fixed line setting smu in KINLapackBand.
      • Fixed bug involving initialization of mxnewtstep.
      • Fixed bug in difference quotient increments in kinDlsBandDQJac.
      • Fixed an incorrect return value ier in FKINSOL function FKINfunc.
    • Changes to the FKINSOL module
      • In optional input routines FKINSETIIN, FKINSETRIN, and FKINSETVIN, removed the optional fourth argument key_length.
      • Revised integer declarations in all examples so that those which must match a C type long int are declared INTEGER*8.
    • Changes related to the build system
      • Dropped support and documentation of the Autotools mode of installation.

    What’s new in v2.7.0?

    • Bug fixes
      • Three major logic bugs were fixed – involving updating the solution vector, updating the linesearch parameter, and a missing error return.
      • Three minor errors were fixed – involving setting etachoice in the Matlab/KINSOL interface, a missing error case in KINPrintInfo, and avoiding an exponential overflow in the evaluation of omega.
      • linear solver memory set to zero after being created.
      • linear solver memory is freed on an error return.
    • Changes to user interface
      • Problem size and related integers (bandwidth parameters etc.) all have type long int, except for those in user calls specifying BLAS/LAPACK routines.

    What’s new in v2.6.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).
      • maintaining a single pointer to user data, optionally specified through a Set-type function.
      • general streamlining of the band-block-diagonal preconditioner module distributed with the solver.

    What’s new in v2.5.0?

    • 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 <kinsol/kinsol.h>).

    What’s new in v2.4.0?

    • New features
      • added direct linear solvers (dense and band, provided through the KINDENSE and KINBAND modules, respectively) thus adding modified (and exact) Newton methods to KINSOL.
      • added KINSPBCG interface module to allow KINSOL to interface with the shared SPBCG (scaled preconditioned Bi-CGSTAB) linear solver module.
      • added KINSPTFQMR interface module to allow KINSOL to interface with the shared SPTFQMR (scaled preconditioned TFQMR) linear solver module.
      • added support for SPBCG and SPTFQMR to the KINBBDPRE preconditioner module.
      • added option to KINBBDPRE preconditioner module to allow specification of different half-bandwidths for difference quotient approximation and retained matrix.
      • added support for interpreting failures in user-supplied functions.
    • Bug fixes
      • corrected a bug in the preconditioner logic that caused the initial call to the preconditioner setup routine (controlled by KINSetNoInitSetup) to be skipped during subsequent calls to KINSol.
    • Changes to underlying algorithm
      • modified the KINBBDPRE preconditioner module to allow the use of different half-bandwidths for the difference quotient approximation and the retained matrix.
      • added nonlinear residual monitoring scheme to control Jacobian updating when a direct linear solver is used (modified Newton iteration).
    • Changes to user interface
      • changed argument of KINFree and KINBBDPrecFree to be the address of the respective memory block pointer, so that its NULL value is propagated back to the calling function.
      • modified the argument list of KINBBDPrecAlloc to allow specification of the upper and lower half-bandwidths to be used in the computation of the local Jacobian blocks (mudq, mldq), and the half-bandwidths of the retained banded approximation to the local Jacobian block (mukeep, mlkeep).
      • added KINSPBCG module which defines appropriate KINSpbcg* functions to allow KINSOL to interface with the shared SPBCG linear solver module.
      • added KINBBDSpbcg function to KINBBDPRE module to support SPBCG linear solver module.
      • changed function type names to accommodate all the Scaled Preconditioned Iterative Linear Solvers now available:
        KINSpgmrJactimesVecFn -> KINSpilsJacTimesVecFn
        KINSpgmrPrecSetupFn -> KINSpilsPrecSetupFn
        KINSpgmrPrecSolveFn -> KINSpilsPrecSolveFn
      • changed function types so that all user-supplied functions return an integer flag.
      • changed some names for KINBBDPRE function outputs.
      • added option for user-supplied error handler function.
      • added option for user-supplied info handler function.
      • renamed all exported header files (except for kinsol.h, all header files have the prefix kinsol_).
      • changed naming scheme for KINSOL examples.
    • Changes to FKINSOL module:
      • modified argument list of FKINBBDINIT to accommodate changes made to KINBBDPRE module, so now user must specify the upper and lower half-bandwidths for the difference quotient approximation (mudq, mldq) and the retained matrix (mukeep, mlkeep).
      • added support for KINSPBCG/SPBCG (added FKIN*SPBCG* functions).
      • added support for KINSPTFQMR/SPTFQMR (added FKIN*SPTFQMR* functions).
      • added support for KINDENSE/DENSE (added FKIN*DENSE* functions).
      • added support for KINBAND/BAND (added FKIN*DENSE* functions).
      • Optional inputs are now set using routines FKINSETIIN (integer inputs), FKINSETRIN (real inputs), and FKINSETVIN (vector inputs) through pairs key-value. Optional outputs are still obtained from two arrays (IOUT and ROUT), owned by the user and passed as arguments to FKINMALLOC.
    • 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).
      • the main KINSOL header file (kinsol.h) is still exported to the install include directory. However, all other KINSOL header files are exported into a kinsol subdirectory of the install include directory.
      • the KINSOL library now contains all shared object files (there is no separate libsundials_shared library any more).

    What’s new in v2.3.0?

    • Changes to user interface
      • KINSOL now stores an actual copy of the constraints vector rather than just a pointer in order to resolve potential scoping issues.
      • several optional input functions were combined into a single function:
        - KINSpgmrSetPrecSetupFn, KINSpgmrSetPrecSolveFn and KINSpgmrSetPrecData were combined into KINSpgmrSetPreconditioner
        - KINSpgmrSetJacTimesVecFn and KINSpgmrSetJacData were combined into KINSpgmrSetJacTimesVecFn
    • Changes to FKINSOL module:
      • FKINSPGMRSETPSET and FKINSPGMRSETPSOL were combined into FKINSPGMRSETPREC.
      • due to changes to the main solver, if FKPSOL is provided, then FKPSET must also be defined, even if it is empty.

    What’s new in v2.2.2?

    • Bug fixes
      • fixed bug in computation of the scaled step length.
      • fixed bug in logic for disabling the call to the preconditioner setup function at the first iteration.
    • Changes to documentation
      • added section with numerical values of all input and output solver constants.
    • 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).
      • added –with-mpi-flags as a configure option to allow user to specify MPI-specific flags.
      • updated Makefiles for Fortran examples to avoid C++ compiler errors (now use CC and MPICC to link).

    What’s new in v2.2.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.

    What’s new in v2.2.0?

    • New feature
      • added option to disable all error messages.
    • Bug fixes
      • fixed constraints-related bug.
      • fixed bug in implementation of line-search method related to beta-condition.
      • corrected value of ealpha variable (related to forcing term).
    • Changes related to NVECTOR module
      • removed machEnv, redefined table of vector operations (now contained in the N_Vector structure itself).
      • all KINSOL functions create new N_Vector variables through cloning, using an N_Vector passed by the user as a template.
    • Changes to type names and KINSOL constants
      • removed type ‘integertype’; instead use ‘int’ or ‘long int’, as appropriate.
      • restructured the list of return values from the various KINSOL functions.
      • changed all KINSOL constants (inputs and return values) to have the prefix ‘KIN_’ (e.g. KIN_SUCCESS).
      • renamed function type ‘SysFn’ to ‘KINSysFn’.
    • Changes to underlying algorithms
      • modified line-search backtracking scheme to use cubic interpolation after the first backtrack, if possible.
      • changed implementation of constraints:
        constraints[i] = 0 then u[i] NOT constrained
        constraints[i] = +1 then u[i] >= 0
        constraints[i] = -1 then u[i] <= 0
        constraints[i] = +2 then u[i] > 0
        constraints[i] = -2 then u[i] < 0
        where u is the solution vector (see the KINSOL User Guide [1] for additional details).
    • Changes to optional input/output
      • added KINSet* and KINGet* functions for optional inputs/outputs, replacing the arrays iopt and ropt.
      • added new optional inputs (e.g. maximum number of nonlinear iterations between calls to preconditioner setup routine, etc.).
      • the value of the last return flag from any function within the SPGMR linear solver module can be obtained as an optional output using KINSpgmrGetLastFlag.
    • Changes to user-callable functions
      • added new function KINCreate which initializes the KINSOL solver object and returns a pointer to the KINSOL memory block.
      • removed N (problem size) from all functions.
      • shortened argument lists of most KINSOL functions (the arguments that were dropped can now be specified through KINSet* functions).
      • removed reinitialization functions for SPGMR linear solver (same functionality can be obtained using KINSpgmrSet* functions).
    • Changes to user-supplied functions
      • removed N (problem dimension) from argument lists.
      • in KINSPGMR, shortened argument lists for user preconditioner functions.