<p>The example you linked to is doing a parameter study of the Lorenz system. That is, it solves a big number of the same equations with different parameters. The state type is <code>vex::multivector&lt;double,3&gt;</code>, which packs together states (3D coordinates) of many Lorenz systems. This is an embarrassingly parallel problem and one can apply the odeint algorithm to the state types in lock-step. That is, operations like <code>x += tau * dt</code> where <code>x</code> and <code>dt</code> are large vectors, are performed on a GPU.</p>

<p>More details about odeint/vexcl implementation may be found in [1]. [2] is an interesting paper about how to extract parallelism in the case of coupled systems.</p>

<p>[1] Ahnert, Karsten, Denis Demidov, and Mario Mulansky. "Solving ordinary differential equations on GPUs." Numerical Computations with GPUs. Springer, Cham, 2014. 125-157. <a href="https://doi.org/10.1007/978-3-319-06548-9_7" rel="nofollow noreferrer">https://doi.org/10.1007/978-3-319-06548-9_7</a> (<a href="https://www.researchgate.net/profile/Denis_Demidov/publication/303728047_Solving_ordinary_differential_equations_on_GPUs/links/5dc9234892851c8180436b87/Solving-ordinary-differential-equations-on-GPUs.pdf" rel="nofollow noreferrer">pdf</a>)</p>

<p>[2] Mulansky, Mario. "Optimizing Large-Scale ODE Simulations." arXiv preprint <a href="https://arxiv.org/abs/1412.0544" rel="nofollow noreferrer">arXiv:1412.0544</a> (2014).</p>
Boost - Odeint: What means concurrency using VexCL and how to improve it?
<p>My question is related to the <a href="https://www.boost.org/doc/libs/1_72_0/libs/numeric/odeint/doc/html/boost_numeric_odeint/tutorial/using_opencl_via_vexcl.html" rel="nofollow noreferrer">tutorial</a> which explains how to implement boost::odeint with VexCL in order to achieve concurrency (the complete code can be found <a href="https://github.com/headmyshoulder/odeint-v2/blob/master/examples/vexcl/lorenz_ensemble.cpp" rel="nofollow noreferrer">here</a>).</p>

<p>The following figure shows how I think of the iterations of ODEINT:
<a href="https://i.stack.imgur.com/pYG3x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pYG3x.png" alt="enter image description here"></a></p>

<p>Now I ask myself, <strong>what exactly / or which part of it is parallelised</strong> in VexCL?</p>

<p>My impression is, the ODE part is one single task, as all equations of ODE are within one block in the given example. Maybe the integration part runs in three parallel tasks. This results in four tasks, where (I think) the ODE task is a bottle neck (because the equations can become very large).</p>

<p>If this is right I would like to know, <strong>how to improve this concurrency</strong>. I think it make sense to combine ODE and INT horizontally. This results in 3 tasks, each of which cannot be further reduced at this level.</p>