Skip to content
Snippets Groups Projects
Commit 104e29a5 authored by Colm Talbot's avatar Colm Talbot
Browse files

Make sure to remove pool

parent 8c4a3315
No related branches found
No related tags found
1 merge request!754Allow dynesty to run with multiprocessing
Pipeline #115825 passed
......@@ -288,7 +288,6 @@ class Dynesty(NestedSampler):
self.use_ratio
)
)
self.kwargs["pool"] = self.pool
else:
_initialize_global_variables(
likelihood=self.likelihood,
......@@ -297,6 +296,7 @@ class Dynesty(NestedSampler):
use_ratio=self.use_ratio
)
self.pool = None
self.kwargs["pool"] = self.pool
def _close_pool(self):
if getattr(self, "pool", None) is not None:
......@@ -304,6 +304,7 @@ class Dynesty(NestedSampler):
self.pool.close()
self.pool.join()
self.pool = None
self.kwargs["pool"] = self.pool
logger.info("Finished closing worker pool.")
def run_sampler(self):
......
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