|
accelerInt
v0.1
|
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.
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.
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.
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.
accelerInt has a number of dependencies required to run:
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 runningaccelerInt 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.LD_LIBRARY_PATH or equivalent.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.Disabling solvers based on available libaries is a feature that may be added to future versions.
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}
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.
1.8.14