tanhevg / GpABC.jl

MIT License
54 stars 15 forks source link

Parallel (multi-core) model simulations #73

Closed shenkev closed 2 years ago

shenkev commented 2 years ago

I believe it's currently not possible to simulate trajectories from the model in parallel using multiple cores. It would be nice if this could be supported. In the meantime how hard would it be to fork the repo and add this function myself?

It seems like multi-processing is quite easy to do in Julia, basically something like this:

results = pmap(my_function, collect(1:N))

tanhevg commented 2 years ago

You are right that parallel simulation is currently not supported. Adding this would be a major overhaul of the package. Note that if the simulations are taking too long, one workaround provided by the package is using the GP emulator (see docs). The expensive linear algebra operations that are the bottleneck in the emulator mode are parallelised by default on a single multi-core machine.

shenkev commented 2 years ago

Is parallelizing model simulation non trivial? To my understanding the SMC algorithm samples candidates independently. But perhaps it's less trivial for other algorithms. For our project we prefer to try and get SMC to work before trying GP.