From ad30e73461c27139d2572767995b658b4c2ed0c0 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 26 Nov 2020 10:07:11 +0100 Subject: [PATCH] FIX: Limit 3dQwarp to maximum 4 CPUs for stability Resolves: #107. --- sdcflows/workflows/pepolar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdcflows/workflows/pepolar.py b/sdcflows/workflows/pepolar.py index d39e16780c..5900eedd9c 100644 --- a/sdcflows/workflows/pepolar.py +++ b/sdcflows/workflows/pepolar.py @@ -122,8 +122,8 @@ def init_pepolar_unwarp_wf(omp_nthreads=1, matched_pe=False, qwarp = pe.Node(afni.QwarpPlusMinus( pblur=[0.05, 0.05], blur=[-1, -1], noweight=True, minpatch=9, nopadWARP=True, - environ={'OMP_NUM_THREADS': '%d' % omp_nthreads}), - name='qwarp', n_procs=omp_nthreads) + environ={'OMP_NUM_THREADS': f"{min(omp_nthreads, 4)}"}), + name='qwarp', n_procs=min(omp_nthreads, 4)) to_ants = pe.Node(niu.Function(function=_fix_hdr), name='to_ants', mem_gb=0.01)