-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Sometimes (not all the time but very often), when launching an iteration for the Bold_mriqc pipeline, an issue occurs for some subjects: the pipeline fails because of an issue in GCOR brick.
It is not a problem related to a subject because if we launch an other time it works.
The GCOR brick launches the AFNI script @compute_gcor via Nipype.
This script launches several command and create at least 4 temporary files (tmp.unit+orig.BRIK, tmp.unit+orig.HEAD, tmp.unit.gmean.1D tmp.gcor.1D) in order to compute GCOR.
Those files are created in the current directory and are removed at the end of the @compute_gcor script.
Two different issues has been spotted (by looking at standard outputs for GCOR brick in soma workflow) :
stdout 2023-05-31T11:36:31.747714:** command failure: 3dTnorm -overwrite -polort 0 -prefix tmp.unit /host/ZorglubBigZFSPool/Data/MIA-IRMaGe-3T/mia_projects/NeuroMod_mriqc/data/derived_data/reg_sub-28-ses-02--2-func-sub-28_ses-02_task-192dyn_run-02_bold-_valid.nii[0..$]
This error occurs because of the file tmp.unit+orig.HEAD dos not exist
if ( ! -f $tmpunit$view.HEAD ) then
echo "** command failure:" $cmd $inset\[$nfirst..\$]
exit
endif
230531-14:16:23,360 nipype.interface INFO: stderr 2023-05-31T14:16:23.360457:*** failure while opening brick file ./tmp.unit+orig.BRIK - do you have permission? 230531-14:16:23,360 nipype.interface INFO: stderr 2023-05-31T14:16:23.360457:*** Unix error message: No such file or directory
This errors occurs because the file ./tmp.unit+orig.BRIK dos not exist
In MIA the current directory is "project/derived_data" (checked by printing cwd
in @compute_gcor script and by removing the suppression of the temporary files).
So, when we use iteration, the temporary files are created for several subjects with the same name and in the same folder potentially at the same time.
It could explain the bug.
To do : maybe it is possible to create the file in a temporary folder in derived_data (as for SPM)