accelerInt  v0.1
accelerInt

What is the purpose of accelerInt?

accelerInt is a ODE integration library for the CPU and GPU (future versions will support other SIMD devices) containing several validated stiff-ODE solvers. accelerInt has primarily been used with the python tool pyJac to enable chemical kinetic integration, however it aims to be usable for general purpose ODE integration.

accelerInt is currently in beta form. We welcome any and all feedback on improving usability, documentation, examples or functionality. If you have any comments, concerns or issues, please get in contact via our github repo.

Currently available Integrators

A number of stiff integration methods are available in accelerInt on both the CPU and GPU:

Integrator Type Order CPU GPU
CVODE1 Implicit VODE Variable (Max 5th) X
Radau-IIa2 Implicit RK 5th X X
EXP43 Semi-implicit Exponential Nominally 4th X X
EXPRB434 Semi-implicit Exponential 4th X X
RKC5 Explicit Runge Kutta Stabilized 2nd X X

Note: The RKC integrator is in prelimary support, and has not been fully validated in this work.

  1. A. C. Hindmarsh, P. N. Brown, K. E. Grant, S. L. Lee, R. Serban, D. E. Shumaker, C. S. Woodward, SUNDIALS: Suite of nonlinear and differential/algebraic equation solvers, ACMT. Math. Softw. 31 (3) (2005) 363–396. doi:10.1145/1089014.1089020.
  2. G. Wanner, E. Hairer, Solving Ordinary Differential Equations II: Stiff and Differential Algebraic Problems, 2nd Edition, Springer-Verlag, Berlin, 1996. doi:10.1007/978-3-642-05221-7.
  3. M. Hochbruck, C. Lubich, H. Selhofer, Exponential integrators for large systems of differential equations, SIAM J. Sci. Comput. 19 (5) (1998) 1552–1574. doi:10.1137/S1064827595295337
  4. M. Hochbruck, A. Ostermann, J. Schweitzer, Exponential Rosenbrock-type methods, SIAM J. Numer. Anal. 47 (1) (2009) 786–803. doi:10.1137/080717717.
  5. "Accelerating moderately stiff chemical kinetics in reactive-flow simulations using GPUs," J Comput Phys 256 (2014) 854-871. doi:10.1016/j.jcp.2013.09.025

Compilation and Dependencies

accelerInt is a collection of C and CUDA-C code compiled via SCons. We again encourage feedback on the compilation process as it has not been widely tested.

Specifying SCons options

SCons is a flexible build system that allows the user to specify many options via the command line controlling the compilation process. Options may be specified via, e.g:

scons toolchain=gnu

This will store the specified option (in this case, using the GNU toolchain) in a file accelerInt.conf. Alternatively, this file may be created directly by the user to specify many options.

See Configuration options for building accelerInt for a full listing of command line options and their effects.

Dependencies

accelerInt has a number of dependencies required to run:

  1. A working C/C++ compiler
    • accelerInt will attempt to find a valid gcc/g++ installation by default. Alteratively the 'intel' toolchain can be specified to use icc/icpc, or clang, however these are less tested and may require some work to get up and running
  2. A working CUDA installation [Optional]
    • accelerInt will attempt to find a valid CUDA installation in a number of common install locations. If it cannot be found, the GPU integrators will be turned off. To manually specify the CUDA path, the environment (or SCons options) CUDA_TOOLKIT_PATH and CUDA_SDK_PATH may be set.
  3. CVODE
    • A working Sundials/CVODE installation should be available on the LD_LIBRARY_PATH or equivalent.
  4. BLAS/LAPACK
    • A working BLAS/LAPACK implementation is required for linear algebra routines for the CPU solvers (LU Factorization, Inversion, etc.) By default accelerInt looks for Intel's MKL Library, however other libraries and directories may be specified via the blas_lapack_libs and blas_lapack_dir SCons configuration options.
  5. FFTW3
    • The FFTW3 library is required to calculate the rational approximants for the Exponential integrators

Disabling solvers based on available libaries is a feature that may be added to future versions.

Memory Format

The state vector expected by accelerInt should be formatted in Column-major (Fortan) order, future versions will include optional use of the Row-major (C) data ordering.

For a state vector with \(N\) entries, and \(N_{p}\) separate initial value problems (IVPs) to solve, with \(y_{i, j}\) the j-th entry in the state vector for the i-th IVP. The resulting data-matrix looks like:

\begin{align} \Phi &= \left[ \begin{array}{cccc} y_{1,1} & y_{1,2} & \ldots & y_{1,N} \\ y_{2,1} & y_{2,2} & \ldots & y_{2,N} \\ \vdots & \vdots & \ddots & \vdots \\ y_{N_{p},1} & y_{N_{p},2} & \ldots & y_{N_{p},N} \end{array} \right] \end{align}

This is then flattened in column-major order:

\begin{align} \vec{\Phi} = \left\{ y_{1,1}, y_{2,1} \ldots y_{N_{p},1}, y_{1,2} \ldots, y_{N_{p},2} \ldots y_{N_{p},N} \right\} \end{align}

Examples

For a fully worked integration problem, see the van der Pol equation example Another recently added example (thanks to Andrew Alferman) implements the Oregonator problem.