Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yarikoptic opened this issue May 21, 2024 · 1 comment

Comments

@yarikoptic
Copy link

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)

@yarikoptic
Copy link
Author

a fix will be tested/proposed within

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant