Skip to content

Should exit with non-0 exit code in case of failing, and likely even upon initial fail to run AFNI / fsl tools #45

@yarikoptic

Description

@yarikoptic

Discovered while trying

where invocation of

yoh@typhon:/mnt/DATA/data/yoh/1076_spacetop$ singularity run -B $PWD:$PWD:ro -B $PWD/derivatives:$PWD/derivatives:rw -B $PWD/scratch:$PWD/scratch:rw --scratch $PWD/scratch --pwd $PWD --net --network none ../dsst-defacing-pipeline/dsst-defacing-pipeline-test.sing -p 0001 -s 01 -- . derivatives/dss-defacing-1 

lead to a quick run without stating an ERROR but doing nothing, exiting with normal exit code (0), and producing bunch of log files which actually showed the error:

...
[]
Preparing for QC by visual inspection...

yoh@typhon:/mnt/DATA/data/yoh/1076_spacetop$ echo $?
0

yoh@typhon:/mnt/DATA/data/yoh/1076_spacetop$ cat /mnt/DATA/data/yoh/1076_spacetop/derivatives/dss-defacing-1/bids_defaced/sub-0133/ses-01/anat/defacing_pipeline.log
================================ afni_refacer_run command ================================
module load afni ; export OMP_NUM_THREADS=1 ; @afni_refacer_run -input /mnt/DATA/data/yoh/1076_spacetop/sub-0133/ses-01/anat/sub-0133_ses-01_acq-MPRAGEXp3X08mm_T1w.nii.gz -mode_deface -no_clean -prefix /mnt/DATA/data/yoh/1076_spacetop/derivatives/dss-defacing-1/bids_defaced/sub-0133/ses-01/anat/sub-0133_ses-01_acq-MPRAGEXp3X08mm_T1w
==========================================================================================
/bin/sh: line 1: module: command not found
/bin/sh: line 1: @afni_refacer_run: command not found
@afni_refacer_run work directory not found. Most probably because the refacer command failed.

which also showed that there is a hardcoded assumption of needing "environment modules" (module command) which is generally not needed and thus IMHO should be done OUTSIDE of the pipeline to load all desired components (different HPCs might have different names for them etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions