21cmfast / 21cmFAST

Official repository for 21cmFAST: a code for generating fast simulations of the cosmological 21cm signal
MIT License
56 stars 37 forks source link

Improve Parallelisation #365

Open daviesje opened 3 months ago

daviesje commented 3 months ago

The speedup from parallelisation in the current form of 21cmFAST drops significantly after ~4 cores. It would be nice to look into possible improvements so that we can scale better with larger boxes, or with some of the slower modes of running the model.

Some improvements could include:

A more minor point on how OpenMP is written is that in the previously existing parts of the code, every variable used in a parallel region is explicitly declared as shared or private in the directive, whereas my additions rely on the default scoping, where all variables are assumed shared unless declared inside the parallel region. I wrote them like this since I believe it is more readable, however I would appreciate some input on which style is preferred by others, so that we can make it uniform across the package.