Closed manuegrx closed 1 year ago
Quick update :
Test done : change self.output_directory
in the GCOR brick by added a sub folder for each subject (name_data for example) --> in this case no more errors
However we still have an issue with the initialization of self.output_directory
during iteration (see https://github.com/populse/mia_processes/issues/40 ) , so I will wait until issue 40 is fixed before to fix this issue
Does closing ticket #40 also fix this issue?
I can make a modification the GCOR brick by added a sub folder for each subject as for the SPM stat brick. In this case the issue will be fix! However, as no files are created at the end of the GCOR brick, it will create an empty sub-folder for each subject, is it an issue ?
Please try with a real case in your side, with a freshly updated populse, then if it's ok for you, take pleasure in closing this ticket!
It works with these modifications, thanks !
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
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)