Skip to content

Commit

Permalink
hardcode nthreads_per_worker to 1 in smoovie
Browse files Browse the repository at this point in the history
  • Loading branch information
landmanbester committed Nov 30, 2024
1 parent f0b4500 commit e463591
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pfb/workers/smoovie.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,16 @@ def smoovie(**kw):
opts, basedir, oname = set_output_names(opts)

import psutil
nthreads = psutil.cpu_count(logical=True)
ncpu = psutil.cpu_count(logical=False)
if opts.nthreads is None:
opts.nthreads = nthreads//2
ncpu = ncpu//2

# to prevent flickering
opts.nthreads = 1
if opts.product.upper() not in ["I","Q", "U", "V"]:
raise NotImplementedError(f"Product {opts.product} not yet supported")

timestamp = time.strftime("%Y%m%d-%H%M%S")
logname = f'{str(opts.log_directory)}/smoovie_{timestamp}.log'
pyscilog.log_to_file(logname)
print(f'Logs will be written to {logname}', file=log)

OmegaConf.set_struct(opts, True)

# TODO - prettier config printing
Expand Down

0 comments on commit e463591

Please sign in to comment.