Skip to content
Snippets Groups Projects
Commit c31b9ec8 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch 'fix-ptemcee-parallel' into 'master'

Fix bug in the npool access method to paralelization of ptemcee

See merge request lscsoft/bilby!797
parents f51d9577 dfc9c3ee
No related branches found
No related tags found
1 merge request!797Fix bug in the npool access method to paralelization of ptemcee
Pipeline #131627 passed with warnings
......@@ -193,7 +193,13 @@ class Ptemcee(MCMCSampler):
)
self.convergence_inputs = ConvergenceInputs(**convergence_inputs_dict)
# MultiProcessing inputs
# Check if threads was given as an equivalent arg
if threads == 1:
for equiv in self.npool_equiv_kwargs:
if equiv in kwargs:
threads = kwargs.pop(equiv)
# Store threads
self.threads = threads
# Misc inputs
......@@ -221,10 +227,6 @@ class Ptemcee(MCMCSampler):
for equiv in self.nwalkers_equiv_kwargs:
if equiv in kwargs:
kwargs["nwalkers"] = kwargs.pop(equiv)
if "threads" not in kwargs:
for equiv in self.npool_equiv_kwargs:
if equiv in kwargs:
kwargs["threads"] = kwargs.pop(equiv)
def get_pos0_from_prior(self):
""" Draw the initial positions from the prior
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment