Trouble merging T1 images

Now that I’ve got my shiny new FMRIPrep 1.4.1 installation going, I’ve hit a new snag. I’m analyzing the OASIS3 dataset, which has several runs for each participant (up to 4 or 5) and multiple T1s at each timepoint. So eventually I get to a point where fmriprep is trying to merge many T1s, and it keeps failing, like so:

cat /n/scratch2/bdf1/OASIS/derivatives/fmriprep/sub-OAS30004/log/20190719-151129_2b54c614-de57-4bd6-9c95-9c721b09df7d/crash-20190719-153017-bdf1-t1_merge-59cde0ed-a554-4c50-8cc7-fd158f28f7ae.txt
Node: fmriprep_wf.single_subject_OAS30004_wf.anat_preproc_wf.anat_template_wf.t1_merge
Working directory: /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge

Node inputs:

args = <undefined>
auto_detect_sensitivity = True
average_metric = <undefined>
environ = {'SUBJECTS_DIR': '/home/bdf1/software/freesurfer/subjects', 'OMP_NUM_THREADS': '4'}
fixed_timepoint = True
in_files = ['/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz', '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct1/sub-OAS30004_ses-d1101_run-02_T1w_corrected.nii.gz', '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct2/sub-OAS30004_ses-d2229_run-01_T1w_corrected.nii.gz', '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct3/sub-OAS30004_ses-d2229_run-02_T1w_corrected.nii.gz', '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct4/sub-OAS30004_ses-d2232_run-01_T1w_ras_corrected.nii.gz', '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct5/sub-OAS30004_ses-d2232_run-02_T1w_corrected.nii.gz', '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct6/sub-OAS30004_ses-d3457_T1w_ras_corrected.nii.gz']
in_intensity_scales = <undefined>
initial_timepoint = 1
initial_transforms = <undefined>
intensity_scaling = True
no_iteration = True
num_threads = 7
out_file = sub-OAS30004_ses-d1101_run-01_T1w_template.nii.gz
outlier_sensitivity = <undefined>
scaled_intensity_outputs = <undefined>
subjects_dir = /home/bdf1/software/freesurfer/subjects
subsample_threshold = 200
transform_outputs = True

Traceback (most recent call last):
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 472, in run
    result = self._run_interface(execute=True)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 563, in _run_interface
    return self._run_command(execute)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/interfaces/freesurfer/base.py", line 265, in run
    return super(FSCommandOpenMP, self).run(**inputs)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/interfaces/freesurfer/base.py", line 144, in run
    return super(FSCommand, self).run(**inputs)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 375, in run
    runtime = self._run_interface(runtime)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 758, in _run_interface
    self.raise_exception(runtime)
  File "/home/bdf1/software/anaconda3/envs/fmriprep141sing/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 695, in raise_exception
    ).format(**runtime.dictcopy()))
RuntimeError: Command:
mri_robust_template --satit --fixtp --mov /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct1/sub-OAS30004_ses-d1101_run-02_T1w_corrected.nii.gz /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct2/sub-OAS30004_ses-d2229_run-01_T1w_corrected.nii.gz /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct3/sub-OAS30004_ses-d2229_run-02_T1w_corrected.nii.gz /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct4/sub-OAS30004_ses-d2232_run-01_T1w_ras_corrected.nii.gz /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct5/sub-OAS30004_ses-d2232_run-02_T1w_corrected.nii.gz /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct6/sub-OAS30004_ses-d3457_T1w_ras_corrected.nii.gz --inittp 1 --iscale --noit --template sub-OAS30004_ses-d1101_run-01_T1w_template.nii.gz --subsample 200 --lta /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp1.lta /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp2.lta /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp3.lta /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp4.lta /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp5.lta /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp6.lta /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp7.lta
Standard output:
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $

--satit: Will estimate SAT iteratively!
--fixtp: Will map everything to init TP!
--mov: Using /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz as movable/source volume.
--mov: Using /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct1/sub-OAS30004_ses-d1101_run-02_T1w_corrected.nii.gz as movable/source volume.
--mov: Using /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct2/sub-OAS30004_ses-d2229_run-01_T1w_corrected.nii.gz as movable/source volume.
--mov: Using /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct3/sub-OAS30004_ses-d2229_run-02_T1w_corrected.nii.gz as movable/source volume.
--mov: Using /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct4/sub-OAS30004_ses-d2232_run-01_T1w_ras_corrected.nii.gz as movable/source volume.
--mov: Using /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct5/sub-OAS30004_ses-d2232_run-02_T1w_corrected.nii.gz as movable/source volume.
--mov: Using /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct6/sub-OAS30004_ses-d3457_T1w_ras_corrected.nii.gz as movable/source volume.
    Total: 7 input volumes
--inittp: Using TP 1 as target for initialization
--iscale: Enableing intensity scaling!
--noit: Will output only first template (no iterations)!
--template: Using sub-OAS30004_ses-d1101_run-01_T1w_template.nii.gz as template output volume.
--subsample: Will subsample if size is larger than 200 on all axes!
--lta: Will output LTA transforms
Setting iscale ...
reading source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz'...
converting source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct1/sub-OAS30004_ses-d1101_run-02_T1w_corrected.nii.gz'...
converting source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct1/sub-OAS30004_ses-d1101_run-02_T1w_corrected.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct2/sub-OAS30004_ses-d2229_run-01_T1w_corrected.nii.gz'...
converting source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct2/sub-OAS30004_ses-d2229_run-01_T1w_corrected.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct3/sub-OAS30004_ses-d2229_run-02_T1w_corrected.nii.gz'...
converting source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct3/sub-OAS30004_ses-d2229_run-02_T1w_corrected.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct4/sub-OAS30004_ses-d2232_run-01_T1w_ras_corrected.nii.gz'...
converting source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct4/sub-OAS30004_ses-d2232_run-01_T1w_ras_corrected.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct5/sub-OAS30004_ses-d2232_run-02_T1w_corrected.nii.gz'...
converting source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct5/sub-OAS30004_ses-d2232_run-02_T1w_corrected.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct6/sub-OAS30004_ses-d3457_T1w_ras_corrected.nii.gz'...
converting source '/n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct6/sub-OAS30004_ses-d3457_T1w_ras_corrected.nii.gz' to bspline ...
MRItoBSpline degree 3

MultiRegistration::initializing Xforms (init 1 , maxres 0 , iterate 5 , epsit 0.01 ) : 

[init] ========================= TP 5 to TP 1 ==============================
         Register TP 5 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct4/sub-OAS30004_ses-d2232_run-01_T1w_ras_corrected.nii.gz )
          to      TP 1 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz )


[init] ========================= TP 6 to TP 1 ==============================
         Register TP 6 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct5/sub-OAS30004_ses-d2232_run-02_T1w_corrected.nii.gz )
          to      TP 1 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz )


[init] ========================= TP 3 to TP 1 ==============================
         Register TP 3 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct2/sub-OAS30004_ses-d2229_run-01_T1w_corrected.nii.gz )
          to      TP 1 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz )


[init] ========================= TP 4 to TP 1 ==============================
         Register TP 4 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct3/sub-OAS30004_ses-d2229_run-02_T1w_corrected.nii.gz )
          to      TP 1 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz )


[init] ========================= TP 7 to TP 1 ==============================
         Register TP 7 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct6/sub-OAS30004_ses-d3457_T1w_ras_corrected.nii.gz )
          to      TP 1 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz )


[init] ========================= TP 2 to TP 1 ==============================
         Register TP 2 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct1/sub-OAS30004_ses-d1101_run-02_T1w_corrected.nii.gz )
          to      TP 1 ( /n/scratch2/bdf1/OASIS/work/fmriprep_wf/single_subject_OAS30004_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct0/sub-OAS30004_ses-d1101_run-01_T1w_corrected.nii.gz )

       -- Original : (0.999994, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
       -- Original : (1, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (1, 1, 1)mm and (177, 256, 256) voxels.
       -- Reslicing using cubic bspline 
       -- Original : (0.999994, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
       -- Original : (1, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (1, 1, 1)mm and (177, 256, 256) voxels.
       -- Reslicing using cubic bspline 
       -- Original : (0.999994, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
       -- Original : (0.999994, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
MRItoBSpline degree 3
MRItoBSpline degree 3
MRItoBSpline degree 3
MRItoBSpline degree 3
MRItoBSpline degree 3
MRItoBSpline degree 3
       -- Original : (0.999996, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (1, 1, 1)mm and (177, 256, 256) voxels.
       -- Reslicing using cubic bspline 
MRItoBSpline degree 3
       -- Original : (0.999996, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
MRItoBSpline degree 3
       -- Original : (0.999996, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
MRItoBSpline degree 3
       -- Original : (0.999996, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
MRItoBSpline degree 3
       -- Original : (0.999996, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (0.999996, 0.999996, 0.999996)mm and (176, 257, 257) voxels.
       -- Reslicing using cubic bspline 
       -- Original : (0.999996, 1, 1)mm and (176, 256, 256) voxels.
       -- Resampled: (1, 1, 1)mm and (177, 256, 256) voxels.
       -- Reslicing using cubic bspline 
MRItoBSpline degree 3
MRItoBSpline degree 3

   - Max Resolution used: 2
     -- gpS ( 44 , 64 , 64 )
     -- gpT ( 44 , 64 , 64 )
   - running loop to estimate saturation parameter:

   - Max Resolution used: 2
     -- gpS ( 44 , 64 , 64 )
     -- gpT ( 44 , 64 , 64 )
   - running loop to estimate saturation parameter:

   - Max Resolution used: 2
     -- gpS ( 44 , 64 , 64 )
     -- gpT ( 44 , 64 , 64 )
   - running loop to estimate saturation parameter:

   - Max Resolution used: 2
     -- gpS ( 44 , 64 , 64 )
     -- gpT ( 44 , 64 , 64 )
   - running loop to estimate saturation parameter:

   - Max Resolution used: 2
     -- gpS ( 44 , 64 , 64 )
     -- gpT ( 44 , 64 , 64 )
   - running loop to estimate saturation parameter:

   - Max Resolution used: 2
     -- gpS ( 44 , 64 , 64 )
     -- gpT ( 44 , 64 , 64 )
Standard error:

Return code: -9

This seems to bear some resemblance to:

Or perhaps this:

I’ve tried this with and without --longitudinal specified (which seems to be a workaround for #767), to no avail. Any suggestions?

Blaise

1 Like

For what it’s worth, I’ve run into this issue with two subjects in a longitudinal dataset I’m working with as well.

1 Like