Skip to content

Commit

Permalink
Merge pull request #376 from aria-tools/sss_threadfix
Browse files Browse the repository at this point in the history
Fix bug for when all threads are specified
  • Loading branch information
sssangha authored Aug 3, 2023
2 parents 7b3805d + 52cf056 commit 6c5eea5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/ARIAtools/ARIAProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,14 @@ def __init__(self, filearg, bbox=None, workdir='./', num_threads=1,
self.bbox_file = None
# Pair name for layer extraction
self.pairname = None
self.num_threads = int(num_threads)
# enforced netcdf version
self.nc_version = nc_version
# pass number of threads for multiprocessing computation
if num_threads == 'all':
import multiprocessing
self.num_threads = multiprocessing.cpu_count()
else:
self.num_threads = int(num_threads)

# Determine if file input is single file, a list, or wildcard
# If list of files
Expand Down

0 comments on commit 6c5eea5

Please sign in to comment.