solvers (MCEq.solvers)#
The module contains functions which are called by MCEq.core.MCEqRun.solve() method.
The implementation is a simple Forward-Euler stepper. The stability is under control since the smallest Eigenvalues are known a priory. The step size is “adaptive”, but it is deterministic and known before the integration starts.
The steps that each solver routine does are:
with
and
As one can easily see, each step can be represented by two sparse gemv calls and one vector addition. This is what happens in the MKL and CUDA functions below.
The fastest solver is using NVidia’s cuSparse library provided via the cupy matrix library. Intel MKL is recommended for Intel CPUs, in particular since MKL is using AVX instructions. The plain numpy solver is for compatibility and hacking, but not recommended for general use.
Reference/API#
MCEq.solvers Module#
Functions#
|
Print to console if min_debug_level <= config.debug_level |
|
NVIDIA CUDA cuSPARSE implementation of forward-euler integration. |
|
Intel MKL sparse BLAS implementation of forward-euler integration. |
|
|
|
Apple Accelerate (vecLib) implementation. |
Classes#
|
This class handles the transfer between CPU and GPU memory, and the calling of GPU kernels. |
Class Inheritance Diagram#
