SciML / JumpProcesses.jl

Build and simulate jump equations like Gillespie simulations and jump diffusions with constant and state-dependent rates and mix with differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/JumpProcesses/stable/
Other
138 stars 34 forks source link

Simulation-level parallelism #429

Open Vilin97 opened 1 month ago

Vilin97 commented 1 month ago

SSAs are "embarrassingly" parallel on the simulation level, meaning that N independent simulations can be run at the same time. I don't know how high N is in practice for the users of JumpProcesses but if it's in the thousands, and each simulation is small (e.g. <100 reactions), perhaps each simulation can be run by its own core of a GPU. Memory management would be hard and the networks would need to be small enough to fit in memory, but the potential speedup can be 100-1000x. Are there any fundamental obstacles to this? Perhaps making a prototype with Direct can be a GSoC project for someone already familiar with GPU programming.

TorkelE commented 1 month ago

I know that PySB (https://pysb.org/) have implemented Gillespie simulations on GPU (https://pysb.readthedocs.io/en/stable/modules/simulator.html), so it is definitely possible and there are some implementations one can have a look at already.

ChrisRackauckas commented 1 month ago

It would be very straightforward to do it the DiffEqGPU way.