EN FR
EN FR


Section: New Software and Platforms

SundialsML

Sundials/ML

Keywords: Simulation - Mathematics - Numerical simulations

Scientific Description

Sundials/ML is an OCaml interface to the Sundials suite of numerical solvers (CVODE, CVODES, IDA, IDAS, KINSOL, ARKODE). It supports all features except for the Hypre and PETSC nvectors (which require additional libraries). Its structure mostly follows that of the Sundials library, both for ease of reading the existing documentation and for adapting existing source code, but several changes have been made for programming convenience and to increase safety, namely:

  • solver sessions are mostly configured via algebraic data types rather than multiple function calls,

  • errors are signalled by exceptions not return codes (also from user-supplied callback routines),

  • user data is shared between callback routines via closures (partial applications of functions),

  • vectors are checked for compatibility (using a combination of static and dynamic checks), and

  • explicit free commands are not necessary since OCaml is a garbage-collected language.

Functional Description

Sundials/ML is an OCaml interface to the Sundials suite of numerical solvers (CVODE, CVODES, IDA, IDAS, KINSOL, ARKODE).

New Progress

This year we updated our interface to work with versions 2.6.0 and 2.7.0 of the Sundials library. This included significant work to support the new ARKODE solver, sparse matrices and the KLU and SuperLU/MT linear solvers, OpenMP and Pthreads nvectors, and various new functions and linear solvers in existing solvers. The source files were completely reorganized. The OCaml types for nvectors were adapted to support multiple nvectors. Memory leaks were eliminated and the performance problems investigated. This work was presented at the ACM Workshop on ML [28].