Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

AdamOrmondroyd
Copy link
Contributor

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
Copy link
Member

@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).

Copy link
Member

@williamjameshandley williamjameshandley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work, many thanks @Ormorod

@williamjameshandley williamjameshandley merged commit 70628a5 into PolyChord:master Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants