I would like to farm out solving systems of ODEs onto GPUs, in a 'trivially parallelisable' setting. For example, doing a sensitivity analysis with 512 different parameter sets, or solving the (independent) ODEs associated with something like nodes of a finite element mesh.

Ideally I want to do ODE solving with a smart adaptive timestep solver like CVODE, rather than a fixed timestep like Forward Euler, but running it on an NVIDIA GPU instead of CPU.

Has anyone done this? Are there libraries for it?

  • 2
    $\begingroup$ The ODEs associated with nodes of a finite element mesh are (typically) not independent. $\endgroup$ – David Ketcheson Jan 12 '14 at 6:47
  • $\begingroup$ Hence the brackets! I'm considering an operator-splitting based technique (cardiac electrophysiology simulations), where you solve ODEs at nodes to get a source term for PDE, then change an ODE parameter for next iteration. $\endgroup$ – mirams Jan 12 '14 at 9:34
  • $\begingroup$ Maybe related? What's the state of the art in parallel ODE methods? $\endgroup$ – Kirill Sep 24 '15 at 18:52
  • 1
    $\begingroup$ It's important to specify whether you want to use the same time-stepping for every ODE or not. $\endgroup$ – Christian Clason Sep 30 '15 at 16:15
  • $\begingroup$ Also, if you're specifically interested in the bidomain (or monodomain) equations, you might want to take a look at how CARP does it. $\endgroup$ – Christian Clason Sep 30 '15 at 16:17

You may want to look into Boost's odeint library and Thrust. They can be combined as discussed here.

  • $\begingroup$ This seems to be a bit different - solving massive ODE systems on the GPU in parallel (with communication). That link says "We have experienced that the vector size over which is parallelized should be of the order of 10^6 to make full use of the GPU.". I'm looking for a nice way of farming out O(10) or O(100) vector sized trivially parallelisable ODE solves... $\endgroup$ – mirams Jan 19 '14 at 13:05
  • $\begingroup$ Have you thought on writing directly in cuda or openCL? If I undertood right, what you are doing is iterating over some ODE equation in each thread separately, it shouldn't be difficult to write it directly. $\endgroup$ – Hydro Guy Sep 24 '15 at 13:22
  • $\begingroup$ I imagine it would be possible to code a Forward Euler or other fixed timestep method, where every GPU process uses the same timestep, fairly easily, I'd like to know whether anyone has managed to get adaptive timestepping like CVODE working, or whether this is impossible to make efficient on a GPGPU? $\endgroup$ – mirams Sep 25 '15 at 7:24
  • $\begingroup$ the problem with gpu is that you need to write data-parallel code. If you write the same adaptive routine but absorbing all that flexibility on the values of some parameters, probably it's possible to code it efficiently on gpu. That also means that you can't use branching on instructions, which is probably what you think that would make it impossible to do it. $\endgroup$ – Hydro Guy Sep 29 '15 at 3:30
  • 1
    $\begingroup$ @mirams there's an example for odeint that covers exactly what you are looking for: boost.org/doc/libs/1_59_0/libs/numeric/odeint/doc/html/…, see also github.com/boostorg/odeint/blob/master/examples/thrust/…. Also, odeint supports adaptive multistep methods as in CVODE: github.com/boostorg/odeint/blob/master/examples/… $\endgroup$ – Christian Clason Sep 30 '15 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.