Search code examples
python-3.xmultiprocessingbayesianconcurrent.futures

concurrent.futures with multinest


What is the best python based multinest package that optimizes for multi processing with concurrent.futures?

I've had issues getting multicast to use all of my CPUs with anything but multiprocessing.pool; but the python multinest operations seem to not be able to use that.


Solution

  • On the github issues section for dynesty (one of the two most common, pure-python MultiNest), we discussed this is as well

    https://github.com/joshspeagle/dynesty/issues/100

    There was not a very settled, final explanation, but the thought is that

    (1) The cost function is not large enough to require all of the cores at once (2) The bootstrap flag should be set to 0 to avoid bootstrapping; it's a trick implemented for speed that seems to be interfering.

    I've used Nestle (github.com/kbarbary/nestle) and Dynesty (github.com/joshspeagle/dynesty); they both seem to have this problem no matter the complexity of the cost function.

    I have had great success using PyMultiNest (github.com/JohannesBuchner/PyMultiNest); but it requires the fortran version of MultiNest (github.com/JohannesBuchner/MultiNest), which is very difficult to install correctly -- need to manually install OpenMPI. Both MultiNest and OpenMPI can have compiler issues depending on the OS, system, and configuration thereof.

    I would suggest using PyMultiNest, except that it's so hard to install; Using Dynesty and Nestle are trivial; but they have had this issue with full parallelizations.