Skip to content

Commit

Permalink
explicitly resize_thread_pool in gridding workers
Browse files Browse the repository at this point in the history
  • Loading branch information
landmanbester committed Sep 17, 2024
1 parent 4c3d939 commit 87aca03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pfb/operators/gridder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 87aca03

Please sign in to comment.