brinckmann / montepython_public

Public repository for the Monte Python Code
MIT License
92 stars 78 forks source link

MPI running multiple instances #347

Closed LordKaos39 closed 8 months ago

LordKaos39 commented 9 months ago

running the code with mpirun -np 4 makes the entire process repeat 4 times instead of distributing it across 4 cores.

brinckmann commented 8 months ago

This is intended behavior, using MPI will create one chain per MPI process. If you would like to use multiple cores per process you have to use OMP, i.e: OMP_NUM_THREADS = 4 Note it is generally recommended to do Metropolis-Hastings MCMC with at least four chains.

Best, Thejs