Skip to content

Commit

Permalink
Merge pull request #19 from DCAN-Labs/develop
Browse files Browse the repository at this point in the history
Fix for too many threads.
  • Loading branch information
kathy-snider committed Mar 22, 2021
2 parents 0af56eb + d38d152 commit bead30d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ RUN python3 -m pip install -r "/app/requirements.txt"

# insert pipeline code
ADD https://github.com/DCAN-Labs/dcan-infant-pipeline.git version.json
RUN git clone -b 'v0.0.9' --single-branch --depth 1 https://github.com/DCAN-Labs/dcan-infant-pipeline.git /opt/pipeline
#RUN git clone -b 'v0.0.9' --single-branch --depth 1 https://github.com/DCAN-Labs/dcan-infant-pipeline.git /opt/pipeline
RUN git clone -b 'master' --single-branch --depth 1 https://github.com/DCAN-Labs/dcan-infant-pipeline.git /opt/pipeline


# unless otherwise specified...
Expand Down
4 changes: 3 additions & 1 deletion app/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,9 @@ def _call(cmd, out_log, err_log, num_threads=1):
if num_threads > 1:
# set parallel environment variables
env['OMP_NUM_THREADS'] = str(num_threads)
env['ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS'] = str(num_threads)
env['ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS'] = str(2) # str(num_threads)
if num_threads != 1:
print('Keep ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS at 1 instead of %s.' % num_threads)
with open(out_log, 'w') as out, open(err_log, 'w') as err:
result = subprocess.call(cmd.split(), stdout=out, stderr=err, env=env)
if type(result) is list:
Expand Down

0 comments on commit bead30d

Please sign in to comment.