FMRIPrep Error mcflirt

Can anyone help me with identifying the following error. After 8 hours of processing one subject the following appeared:

200424-18:50:48,360 nipype.workflow INFO:

[Node] Finished “fmriprep_wf.single_subject_01_wf.func_preproc_task_closedeyes_wf.bold_std_trans_wf.bold_reference_wf.enhance_and_skullstrip_bold_wf.apply_mask”.

200424-18:50:51,979 nipype.workflow ERROR:

could not run node: fmriprep_wf.single_subject_01_wf.func_preproc_task_run01_wf.bold_hmc_wf.mcflirt

200424-18:50:51,985 nipype.workflow ERROR:

could not run node: fmriprep_wf.single_subject_01_wf.func_preproc_task_run04_wf.bold_hmc_wf.mcflirt

200424-18:50:51,988 nipype.workflow ERROR:

could not run node: fmriprep_wf.single_subject_01_wf.func_preproc_task_run02_wf.bold_hmc_wf.mcflirt

200424-18:50:51,992 nipype.workflow ERROR:

could not run node: fmriprep_wf.single_subject_01_wf.func_preproc_task_run03_wf.bold_hmc_wf.mcflirt

fMRIPrep failed: Workflow did not execute cleanly. Check log for details

Preprocessing did not finish successfully. Errors occurred while processing data from participants: 01 (4). Check the HTML reports for details.

fMRIPrep: Please report errors to

I’ve checked the log file that showed the following:

Node Name: fmriprep_wf.single_subject_01_wf.func_preproc_task_run03_wf.bold_hmc_wf.mcflirt
Node Name: fmriprep_wf.single_subject_01_wf.func_preproc_task_run04_wf.bold_hmc_wf.mcflirt
Node Name: fmriprep_wf.single_subject_01_wf.func_preproc_task_run01_wf.bold_hmc_wf.mcflirt
Node Name: fmriprep_wf.single_subject_01_wf.func_preproc_task_run02_wf.bold_hmc_wf.mcflirt

Error doesn’t have any code or reference. For the output all anat output is correct, for the func folder only one run has been processed out of 5.

The question is:

  • What is the error & why did it happened?
  • Do I need to start all over again? (took 8 hours to pop that error ;( )

I’d appreciate any help! I have over 30 participants waiting to be processed so I want to avoid it in future too.

PS. Note maybe it’s of some relevance to the error: the functional run that went through was MPRAGE sequence and those that didn’t were all MB sequences.

@PuddleJumper there are more detailed error messages in your output directory - <your-directory>/fmriprep/sub-01/logs/<UUID>/crash.txt. Could you paste the contents of one of those?

If you are reusing both your working and output directories, you should not need to start all over.

Hi, thank you fro reply. Yes, I’m pasting below. There’s one for each failed run.
I’ve searched for Return code: 137 to check what does it mean but didn’t find conclusive answer. Docker says that it could be memory error but I’ve allocated 12gb and 6cpu’s for it so should be ok I guess. Only multi band sequences have the problem.

Node: fmriprep_wf.single_subject_01_wf.func_preproc_task_run04_wf.bold_hmc_wf.mcflirt
Working directory: /tmp/work/fmriprep_wf/single_subject_01_wf/func_preproc_task_run04_wf/bold_hmc_wf/mcflirt

Node inputs:

args =
bins =
cost =
dof =
in_file =
init =
interpolation =
mean_vol =
out_file =
output_type = NIFTI_GZ
ref_file =
ref_vol =
rotation =
save_mats = True
save_plots = True
save_rms =
scaling =
smooth =
stages =
stats_imgs =
use_contour =
use_gradient =

Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/”, line 67, in run_node
result[“result”] =
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/”, line 516, in run
result = self._run_interface(execute=True)
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/”, line 635, in _run_interface
return self._run_command(execute)
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/”, line 741, in _run_command
result =
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/”, line 397, in run
runtime = self._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/”, line 792, in _run_interface
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/”, line 723, in raise_exception
RuntimeError: Command:
mcflirt -in /tmp/work/fmriprep_wf/single_subject_01_wf/func_preproc_task_run04_wf/bold_reference_wf/validate/sub-01_task-run04_bold_valid.nii.gz -out /tmp/work/fmriprep_wf/single_subject_01_wf/func_preproc_task_run04_wf/bold_hmc_wf/mcflirt/sub-01_task-run04_bold_valid_mcf.nii.gz -reffile /tmp/work/fmriprep_wf/single_subject_01_wf/func_preproc_task_run04_wf/bold_reference_wf/gen_ref/ref_bold.nii.gz -mats -plots
Standard output:

Standard error:
Return code: 137

I’d appreciate any help.

Solved the problem. It appeared that there wasn’t enough memory available.