Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Sundials/ML is an interface to the Sundials suite of numerical solvers.

Full documentation is online.

Sundials is a collection of six numerical solvers: CVODE, CVODES, IDA, IDAS, ARKODE, and KINSOL. This interface provides access to all features of the underlying library except the Hypre, PETSC, CUDA, RAJA, and OpenMPdev nvectors (since these require other libraries that are not yet interfaced for OCaml).


See our detailed notes, or try:

  1. Download Sundials, extract, and install it:
    1. mkdir sundials-build
    2. cd sundials-build
    3. cmake -Wno-dev ../sundials-3.1.1, optionally adding:
      • -DOPENMP_ENABLE=1 for OpenMP nvectors,
      • -DPTHREAD_ENABLE=1 for Pthreads nvectors,
      • -DMPI_ENABLE=1 for parallel nvectors,
      • -DLAPACK_ENABLE=1 to use LAPACK routines,
      • -DSUPERLUMT_ENABLE=1 for SuperLUMT solvers, and
      • -DKLU_ENABLE=1 for KLU solvers.
    4. make install
  2. Either install from OPAM: opam install sundialsml, or
    1. Download Sundials/ML, extract, and install it:
    2. ./configure
    3. make
    4. make install or make install-findlib
  3. Start coding!


Known Limitations

Our goal is to provide access from OCaml to as much of Sundials as we can. We do not, however, expose features for which there is no corresponding OCaml library (e.g., some of the nvector modules) or whose implementation would be overly complicated (e.g., in terms of types or mixed C/OCaml data structures) or inefficient.

  • Unsupported nvector modules: CUDA, Hypre ParVector, PETSC, RAJA, and Trilinos (if you provide the required OCaml interface, we'll add the nvector).
You can’t perform that action at this time.