nye17 / javelin

JAVELIN is now working under Python 3!
GNU General Public License v2.0
21 stars 12 forks source link

Threading not working if emcee is installed #11

Closed Zstone19 closed 10 months ago

Zstone19 commented 1 year ago

Firstly, thank you for the continued updates to javelin. I've noticed that when trying to run javelin on multiple cores, it only runs on one no matter what I feed the threads argument in do_mcmc. Digging into it a bit more, I found that lcmodel.py will use the EnsembleSampler object from emcee if it is already installed instead of the object from the internal sampler. However, the do_mcmc function will pass the threads argument to emcee's EnsembleSampler, which is deprecated and no longer works. The threading does work after uninstalling emcee, using the internal sampler.

I could be missing something here, so any help would be greatly appreciated. Thanks!

nye17 commented 10 months ago

Thanks! I've changed the default behavior to be using the internal emcee rather than the system-wide one, because there is no way that the cadence of javelin updates can catch up with that of emcee!