Closed JulioHC00 closed 2 years ago
Hi - This isn't really an exoplanet issue, all of the sampling is done by PyMC and that package only supports parallelizing across chains. You won't get any benefit from using multiple cores per chain because none of the calculations are parallelized. I'm going to close this as a "won't fix" because that's just how PyMC works!
Ah I see! So there's no way to make the sampling go faster than a single core per chain right?
Unfortunately there isn't! Some elements of the model (e.g. linear algebra) may use multiple threads if you have an accelerated linear algebra library (regardless of the setting for cores
), but unfortunately that's it. Sorry!!
Describe the bug
Not sure if this is a bug but it's something that's confusing me. The questions is, can we do multiprocessing with a number of cores larger than the number of chains? That is, when we do pm.sample, can you set
cores
to a number larger thanchains
? If so, I may be having issues because I can assign any number of cores to 2 chains (for example, 40 cores to 2 chains so each should get 20 cores) yet only 2 cores will ever be busy. So it appears as if there's only one core being assigned per chain. If settingcores
>chains
doesn't work, how can we make use of a system with a large number of cores to speed up calculations?Your setup (please complete the following information):
Additional context Same problem happens both in my personal laptop and in a server.