Summary of what happened:
I am running qsiprep on a couple of subjects as a test run, but the pipeline consistently fails at the synthstrip step. I initially suspected a version-related issue, so I tested both QSIPrep 1.0.0 and 1.0.1(latest), but the error persists in both cases. The preprocessing did not complete and the same error message appears each time.
Command used (and if a helper script was used, a link to the helper script or the command generated):
Here is my code:
list=$1
sub=`awk NR==${SLURM_ARRAY_TASK_ID} ${list}`
echo ${sub}
singularity run --cleanenv \
-B /cbica/comp_space/OASIS/:/work/ \
-B /cbica/projects/OASIS/OASIS3/Pipelines/OASIS3_DTI_2024/Data/Init_Downloaded/scans/All/batch_01/:/data/ \
-B /cbica/projects/OASIS/OASIS3/Pipelines/OASIS3_DTI_2024/Protocols/batch_01/:/out/ \
/cbica/projects/OASIS/OASIS3/Pipelines/OASIS3_DTI_2024/qsiprep-1.0.0.sif \
/data/ /out/ participant \
--ignore fieldmaps t2w flair \
--dwi-only \
--separate-all-dwis \
--participant-label ${sub} \
--anat-modality T1w \
--subject-anatomical-reference sessionwise \
--nthreads 4 \
--work-dir /work/ \
--skip-bids-validation \
--unringing-method mrdegibbs \
--no-b0-harmonization \
--output-resolution 2 \
Here is my submit script:
n=$(wc -l ${indir}/Lists/OASIS_Batch01_ | awk '{print $1}')
echo "Count:" $n;
## submit array job
sbatch --array=1-${n} --propagate=NONE --output ${indir}/logs/%x_%j.log --mem=256G --cpus-per-task=4 --time=24:00:00 ${scripts}/qsiprep_wrapper_new.sh ${indir}/Lists/OASIS_Batch01_
Version:
apptainer build /cbica/projects/OASIS/OASIS3/Pipelines/OASIS3_DTI_2024/qsiprep-1.0.0.sif docker://pennlinc/qsiprep:1.0.0
Input data appears valid and follows BIDS structure.
example input:
srinivad@cubic-login3 /cbica/projects/OASIS/OASIS3/Pipelines/OASIS3_DTI_2024 $ ls Data/Init_Downloaded/scans/All/batch_01/sub-OAS30001/
ses-d0757/ ses-d2430/ ses-d3132/ ses-d3746/ ses-d4467/
srinivad@cubic-login3 /cbica/projects/OASIS/OASIS3/Pipelines/OASIS3_DTI_2024 $ tree Data/Init_Downloaded/scans/All/batch_01/sub-OAS30001/ses-d0757/
Data/Init_Downloaded/scans/All/batch_01/sub-OAS30001/ses-d0757/
├── anat
│ ├── sub-OAS30001_ses-d0757_acq-TSE_T2w.json
│ ├── sub-OAS30001_ses-d0757_acq-TSE_T2w.nii.gz
│ ├── sub-OAS30001_ses-d0757_run-01_T1w.json
│ ├── sub-OAS30001_ses-d0757_run-01_T1w.nii.gz
│ ├── sub-OAS30001_ses-d0757_run-02_T1w.json
│ ├── sub-OAS30001_ses-d0757_run-02_T1w.nii.gz
│ ├── sub-OAS30001_ses-d0757_T2star.json
│ ├── sub-OAS30001_ses-d0757_T2star.nii.gz
│ ├── sub-OAS30001_ses-d0757_T2w.json
│ └── sub-OAS30001_ses-d0757_T2w.nii.gz
├── dwi
│ ├── sub-OAS30001_ses-d0757_dwi.bval
│ ├── sub-OAS30001_ses-d0757_dwi.bvec
│ ├── sub-OAS30001_ses-d0757_dwi.json
│ └── sub-OAS30001_ses-d0757_dwi.nii.gz
└── func
├── sub-OAS30001_ses-d0757_task-rest_run-01_bold.json
├── sub-OAS30001_ses-d0757_task-rest_run-01_bold.nii.gz
├── sub-OAS30001_ses-d0757_task-rest_run-02_bold.json
└── sub-OAS30001_ses-d0757_task-rest_run-02_bold.nii.gz
3 directories, 18 files
Relevant log outputs (up to 20 lines):
250506-12:31:24,758 nipype.workflow INFO:
[Node] Finished "rigid_acpc_resample_aseg", elapsed time 114.615632s.
250506-12:31:24,790 nipype.workflow INFO:
[Node] Finished "synthstrip", elapsed time 19.822667s.
250506-12:31:24,790 nipype.workflow WARNING:
Storing result file without outputs
250506-12:31:24,791 nipype.workflow WARNING:
[Node] Error on "qsiprep_1_0_wf.sub_OAS30001_ses_d0757_wf.dwi_preproc_s
es_d0757_wf.hmc_sdc_wf.pre_eddy_b0_ref_wf.synthstrip_wf.synthstrip" (/work/qsipr
ep_1_0_wf/sub_OAS30001_ses_d0757_wf/dwi_preproc_ses_d0757_wf/hmc_sdc_wf/pre_eddy
_b0_ref_wf/synthstrip_wf/synthstrip)
250506-12:31:24,797 nipype.workflow ERROR:
Node synthstrip failed to run on host 2115fmn018.
250506-12:31:24,806 nipype.workflow ERROR:
Saving crash info to /out/sub-OAS30001/log/20250506-103318_26756fb0-ef6
6-443a-a5f3-75832e96db92/crash-20250506-123124-oasis-synthstrip-5f41af70-56f9-46
e7-8b54-65c2c2571aec.txt
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plu
gins/multiproc.py", line 66, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/eng
ine/nodes.py", line 525, in run
result = self._run_interface(execute=True)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/eng
ine/nodes.py", line 643, in _run_interface
return self._run_command(execute)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/eng
ine/nodes.py", line 769, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executin
g Node synthstrip.
Cmdline:
mri_synthstrip -i /work/qsiprep_1_0_wf/sub_OAS30001_ses_d0757_wf/dwi_preproc_ses_d0757_wf/hmc_sdc_wf/pre_eddy_b0_ref_wf/synthstrip_wf/pad_before_synthstrip_wf/resample_skulled_to_reference/topup_imain_avg_trans.nii.gz -o topup_imain_avg_trans_brain.nii.gz -m topup_imain_avg_trans_mask.nii.gz
Stdout:
Configuring model on the CPU
Running SynthStrip model version 1
Input image read from: /work/qsiprep_1_0_wf/sub_OAS30001_ses_d0757_wf/dwi_preproc_ses_d0757_wf/hmc_sdc_wf/pre_eddy_b0_ref_wf/synthstrip_wf/pad_before_synthstrip_wf/resample_skulled_to_reference/topup_imain_avg_trans.nii.gz
Stderr:
DeprecationWarning: the `interpolation=` argument to percentile was renamed to `method=`, which has additional options.
Users of the modes 'nearest', 'lower', 'higher', or 'midpoint' are encouraged to review the method they used. (Deprecated NumPy 1.22)
RuntimeWarning: invalid value encountered in divide
Traceback (most recent call last):
File "/opt/freesurfer/bin/mri_synthstrip", line 232, in <module>
mask = (components == (np.argmax(bincount) + 1))
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 1216, in argmax
return _wrapfunc(a, 'argmax', axis=axis, out=out, **kwds)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
ValueError: attempt to get argmax of an empty sequence
Traceback:
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 401, in run
runtime = self._run_interface(runtime)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/interfaces/freesurfer.py", line 192, in _run_interface
raise Exception('mri_synthstrip failed!')
Exception: mri_synthstrip failed!
Any guidance on how to resolve this would be much appreciated.