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

Make sure sampling parameters keep the same order #3377

Merged
merged 1 commit into from
Jul 13, 2020

Conversation

cdcapano
Copy link
Contributor

This fixes a bug when using sampling parameters with MPI. When the parameters are loaded from the config file, they are initialized as a set, then converted to a list. However, set doesn't preserve order. This means that different slave nodes when running under MPI will think the sampler is giving it parameters in a different order than it is. This fixes this by sorting the sampling parameters (both when they are loaded, and when they are saved to the model's sampling_params attribute... just to be sure). This only would of effected emcee and emcee_pt, and only when running on MPI. Apparently this wasn't an issue in python 2.7, but is in 3.XX.

@cdcapano cdcapano merged commit 4cd71b6 into gwastro:master Jul 13, 2020
@cdcapano cdcapano deleted the order_sampling_parmas branch July 13, 2020 21:58
lenona pushed a commit to lenona/pycbc that referenced this pull request Sep 14, 2020
OliverEdy pushed a commit to OliverEdy/pycbc that referenced this pull request Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants