From 87aca03e881f47b917f9c54fc61200f72e4c2fc1 Mon Sep 17 00:00:00 2001 From: landmanbester Date: Tue, 17 Sep 2024 17:17:39 +0200 Subject: [PATCH] explicitly resize_thread_pool in gridding workers --- pfb/operators/gridder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pfb/operators/gridder.py b/pfb/operators/gridder.py index 87ef3773..e491af36 100644 --- a/pfb/operators/gridder.py +++ b/pfb/operators/gridder.py @@ -12,6 +12,7 @@ import dask.array as da from ducc0.wgridder.experimental import vis2dirty, dirty2vis from ducc0.fft import c2r, r2c, c2c +from ducc0.misc import resize_thread_pool from africanus.constants import c as lightspeed from pfb.utils.weighting import counts_to_weights, _compute_counts from pfb.utils.beam import eval_beam @@ -339,7 +340,7 @@ def image_data_products(dsl, Assumes all datasets are concatenatable and will compute weighted sum of beam ''' - + resize_thread_pool(nthreads) flip_u, flip_v, flip_w, x0, y0 = wgridder_conventions(l0, m0) # TODO - assign ug,vg-coordinates @@ -679,6 +680,7 @@ def compute_residual(dsl, ''' Function to compute residual and write it to disk ''' + resize_thread_pool(nthreads) # expects a list if isinstance(dsl, str): dsl = [dsl]