Solving ODEs in parallel on a supercomputer

Hi everyone,

I would like to solve ODEs in parallel on a supercomputer. I can use one or more nodes and multiple cores per node. There is also the option for node sharing. The job scheduler for the supercomputer is slurm. Which algorithm is the most appropriate for each case (single node, multi-node, multi-core, etc)?

List of algorithms: Parallel Ensemble Simulations · DifferentialEquations.jl

Which “algorithm” do you mean? The type of parallelism, or the ODE solver? The ODE solver shouldn’t matter, I don’t think, in the sense that the fastest serial algorithm should also be able to scale to parallel machines just fine. If you need a stiff solver to solve one instance of the problem, just use a stiff solver on many cores.

If you mean which parallelization method to choose, the descriptions are further down the page here. If you have access to GPUs on your cluster, use EnsembleGPUArray. If not, and your system is easy, there will likely be no problem using the default EnsembleThreads, and if your problem is hard, you may consider EnsembleDistributed instead.

Another note:
I’m not 100% sure that it’s flawless because I haven’t used it in a while and the last commit was a couple months ago, but ClusterManagers.jl offers easy-to-use functionality for interfacing with supercomputers, and includes support for the Slurm scheduler.

1 Like

How many ODEs and how big are they?

1 Like

Note that the newer EnsembleGPUKernel is much faster.

Though only has specific algorithms.

1 Like

This completely depends on whether you have big ODEs or small ODEs, whether they have structure to exploit, and how many you need to solve. But generally EnsembleGPUKernel is going to be the fastest for a large number of trajectories if you have access to GPUs and the right methods are implemented in that form (it’s a small subset). Otherwise for big equations you’ll want to look at:

https://docs.sciml.ai/Overview/stable/showcase/gpu_spde/

The system is around 500 ODEs and I am trying to speed up the solving of the system and the GSA as well (with an eFAST algorithm).

~500 ODEs and I am also performing GSA using eFAST.

Does the same apply to GSA as well?

That probably wants EnsembleGPUKernel.