Table 1
Explicit time-stepping schemes provided by Odeint.
| CATEGORY | METHOD | ACCURACY ORDER |
|---|---|---|
| fixed step size | explicit Euler | 1 |
| modified midpoint | 2 | |
| Runge–Kutta 4 | 4 | |
| Runge–Kutta–Cash–Karp 54 | 5 | |
| Runge–Kutta–Dopri 5 | 5 | |
| Runge–Kutta–Fehlberg 78 | 8 | |
| dynamic step size | Runge–Kutta–Cash–Karp 54 | 5 |
| Runge–Kutta–Dopri 5 | 5 | |
| Runge–Kutta–Fehlberg 78 | 8 | |
| multi-step | Adams–Bashforth | 1…8 |
| Adams–Bashforth–Moulton | 1…8 | |
| symplectic | symplectic Euler | 1 |
| velocity Verlet | 2 | |
| Runge–Kutta–McLachlan | 4 |

Figure 1
Architecture of the Odeint library. In each iteration, the state 𝐮 is advanced from a time t1 to a later time t2 = t1 + δt, δt > 0. The right-hand side (t,u(t)) of the ODE system is encapsulated in the System functor. An Algebra defines mathematical operations over the state-type, i.e., the data type of the state. An optional Observer functor can execute user code at the beginning of every time step.

Listing 1
The OpenFPM distributed vector state-type for Odeint.

Figure 2
Numerical convergence of time-integration schemes with increasing numbers of time steps. (a,b) L∞(◆) and L2(•) error norms for the exponential dynamics of Eq. (1a) (a) and the sigmoidal dynamics of Eq. (1b) (b) with different one-step multi-stage methods (colors, inset legend). Solid lines indicate the theoretically expected slopes. (c,d) L∞(◆) error norms for the exponential (c) and sigmoidal (d) dynamics solved using Adams–Bashforth with different numbers of steps (1…8, colors, inset legend). Solid lines indicate the theoretically expected slopes.

Figure 3
Strong scaling of the OpenFPM+Odeint time integration schemes with increasing numbers of CPU cores and on a GPU. (a) Average wall-clock times in seconds over three independent runs of solving the exponential dynamics from Eq. (1a) using different one-step multi-stage methods (colors, inset legend, error bars below symbol size). The solid black line indicates the optimal speed-up. (b) Average wall-clock times in seconds over 3 independent runs for the 3D Gray-Scott Eq. (2) using different one-step multi-stage methods (colors, inset legend, error bars below symbol size). The solid black line indicates the speed-up for 80% parallel efficiency. (c) Average wall-clock speedups for the SPH dam break case, normalized to the run times reported for the reference CPU implementation without Odeint from [8] (=1.0). All results are averaged over three independent runs (error bars show standard deviation) for different numbers of particles (bar groups). Speedups are given for a single Nvidia GeForce RTX 4090 GPU (blue bars), compared with running the code without the present Odeint interface on the same GPU (orange bars), and running and OpenFPM+Odeint code on 32 cores of an AMD Ryzen 3990X CPU (green bars). (d) Visualization of the fluid, colored by velocity magnitude (color bar), of the SPH dam break case with 1.2 million particles. An OpenFPM domain decomposition onto four processes is shown in the inset figure (one color per process).
Table 2
Software dependencies of OpenFPM.
| DEPENDENCY | USED BY | OPTIONAL | VERSION |
|---|---|---|---|
| OpenMPI | openfpm_vcluster | NO | 4.1.6 |
| METIS | openfpm_pdata | YES (or ParMETIS) | 5.1.0 |
| ParMETIS | openfpm_pdata, openfpm_numerics | YES (or METIS) | 4.0.3 |
| BOOST | openfpm_data, openfpm_vcluster, openfpm_io, openfpm_pdata, openfpm_numerics | NO | 1.84.0 |
| zlib | openfpm_io | NO | 1.3.1 |
| HDF5 | openfpm_io | NO | 1.14.3 |
| Vc | openfpm_data | NO | 1.4.4 |
| libhilbert | openfpm_data | NO | master |
| HIP | openfpm_devices | Yes | |
| alpaka | openfpm_devices | Yes | |
| OpenBLAS | openfpm_numerics | NO | 0.3.26 |
| suitesparse | openfpm_numerics | NO | 5.7.2 |
| Eigen | openfpm_numerics | Yes (or Petsc) | 3.4.0 |
| Blitz++ | openfpm_numerics | NO | 1.0.2 |
| Algoim | openfpm_numerics | NO | master |
| PETSc | openfpm_numerics | Yes (or Eigen) | 3.20.5 |

Listing 2
Odeint System functor for the 3D Gray-Scott problem in OpenFPM.

Listing 3
An OpenFPM program using an Odeint time stepper.
