Reduce memory usage for ensemble problems


I have a test particle tracer which is built on top of OrdinaryDiffEq.jl. This model can have 3D numerical fields as input parameters and solve ODEs for each set of initial conditions.

However, when testing on the multiple particles setup, i.e. an ensemble problem, I encountered a memory bottleneck where the field arrays (wrapped by Interpolations.jl here) are replicated for each solution in the ensemble problem. For example, given a test EM field of ~ 80MB, each solution is also ~ 80MB in memory. More details can be found here.

In my case, the field parameter would be the same for all particles, but each test particle may have different initial condition. Is there a way to reuse the same interpolated field information for the ensemble problem to save memory?

1 Like