From d04ab175c803c38986159a440b71efa07622d9e4 Mon Sep 17 00:00:00 2001 From: Kathy Snider Date: Mon, 15 Mar 2021 14:33:38 -0700 Subject: [PATCH 1/4] Fix problem with ANTS threads. --- app/pipelines.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/pipelines.py b/app/pipelines.py index 31fe0a8..dff20d0 100755 --- a/app/pipelines.py +++ b/app/pipelines.py @@ -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'] = 1 # 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: From 7d3459e9b11b2a2c7f363cbdbf6821f242add6ab Mon Sep 17 00:00:00 2001 From: Kathy Snider Date: Mon, 15 Mar 2021 15:23:29 -0700 Subject: [PATCH 2/4] Must be a string. --- app/pipelines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pipelines.py b/app/pipelines.py index dff20d0..8ce8ccf 100755 --- a/app/pipelines.py +++ b/app/pipelines.py @@ -1146,7 +1146,7 @@ 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'] = 1 # str(num_threads) + env['ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS'] = str(1) # 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: From cee7aceec19095357f420006ff3dac25a08d9215 Mon Sep 17 00:00:00 2001 From: Kathy Snider Date: Wed, 17 Mar 2021 07:03:44 -0700 Subject: [PATCH 3/4] Try 2 threads per ANTS process. --- app/pipelines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pipelines.py b/app/pipelines.py index 8ce8ccf..0a5b8ff 100755 --- a/app/pipelines.py +++ b/app/pipelines.py @@ -1146,7 +1146,7 @@ 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(1) # 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: From 7e7d1fbc789eed2f1ad5a219e63856d6acd53822 Mon Sep 17 00:00:00 2001 From: Kathy Snider Date: Thu, 18 Mar 2021 16:14:53 -0700 Subject: [PATCH 4/4] Use latest dcan scripts, so we get the debug info in volume. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 62fa4e6..6339473 100755 --- a/Dockerfile +++ b/Dockerfile @@ -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...