Skip to content

Commit

Permalink
Handling threads in script
Browse files Browse the repository at this point in the history
  • Loading branch information
anroy1 committed Aug 15, 2024
1 parent bb0175c commit 3d53ec3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/nf-scil/registration/synthregistration/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ process REGISTRATION_SYNTHREGISTRATION {
def init = task.ext.init ? "-m " + task.ext.init : "-m affine"
def warp = task.ext.warp ? "-m " + task.ext.warp : "-m deform"
def header = task.ext.header ? "-H" : ""
def threads = task.ext.threads ? "-j " + task.ext.threads : ""
def gpu = task.ext.gpu ? "-g" : ""
def lambda = task.ext.lambda ? "-r " + task.ext.lambda : ""
def steps = task.ext.steps ? "-n " + task.ext.steps : ""
Expand All @@ -36,8 +35,8 @@ process REGISTRATION_SYNTHREGISTRATION {
export OMP_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
mri_synthmorph ${init} -t ${prefix}__init_warp.lta $moving $fixed
mri_synthmorph ${warp} ${gpu} ${lambda} ${steps} ${extent} ${weight} -i ${prefix}__init_warp.lta -t ${prefix}__deform_warp.nii.gz -o ${prefix}__output_warped.nii.gz $moving $fixed
mri_synthmorph -j $task.cpus ${init} -t ${prefix}__init_warp.lta $moving $fixed
mri_synthmorph -j $task.cpus ${warp} ${gpu} ${lambda} ${steps} ${extent} ${weight} -i ${prefix}__init_warp.lta -t ${prefix}__deform_warp.nii.gz -o ${prefix}__output_warped.nii.gz $moving $fixed
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down

0 comments on commit 3d53ec3

Please sign in to comment.