PolyChord / PolyChordLite

Public version of PolyChord: See polychord.co.uk for PolyChordPro
https://polychord.io/
Other
84 stars 26 forks source link

Correct root=root -> root=0 in make_resume_file #92

Closed AdamOrmondroyd closed 1 year ago

AdamOrmondroyd commented 2 years ago

Previously, make_resume_file() in polychord.py (used only when the user provides their own initial samples) uses a try... except NameError block to identify whether MPI has been imported. However, the same block refers to root without it being defined, which will also throw a NameError.

Here I have corrected root=root to root=0, and updated the MPI check to set MPI=False if it can't be imported, and use an if instead of exception handling.

williamjameshandley commented 2 years ago

@maudformanek, I know that you have been using the make_resume_file() functionality, so this bug may have affected some of your runs (unless you fixed it locally).