Error with tcompcor: SVD did not converge

fmriprep

#1

Hey guys:

I had gotten through a lengthy run of FMRIPREP when I got an error saying:

could not run node: fmriprep_wf.single_subject_S04V1A_wf.func_preproc_task_compound_run_01_wf.bold_confounds_wf.tcompcor

With the following traceback:

Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py”, line 69, in run_node
result[‘result’] = node.run(updatehash=updatehash)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 471, in run
result = self._run_interface(execute=True)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 555, in _run_interface
return self._run_command(execute)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 635, in _run_command
result = self._interface.run(cwd=outdir)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base/core.py”, line 521, in run
runtime = self._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/interfaces/patches.py”, line 51, in _run_interface
runtime = super(RobustTCompCor, self)._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/algorithms/confounds.py”, line 539, in _run_interface
self.inputs.pre_filter, degree, self.inputs.high_pass_cutoff, TR)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/algorithms/confounds.py”, line 1189, in compute_noise_components
u, _, _ = linalg.svd(M, full_matrices=False)
File “/usr/local/miniconda/lib/python3.6/site-packages/scipy/linalg/decomp_svd.py”, line 132, in svd
raise LinAlgError(“SVD did not converge”)
numpy.linalg.linalg.LinAlgError: SVD did not converge

I checked out this issue that seems to indicate its a memory problem and that cleaning up the working directory fixes the issue.
I am saving files to both a working and output directory. Does this mean I need to erase the whole working directory and start over? I’m mostly asking because this error popped up after 12 hours of processing and I’ll start from scratch if necessary but I’m not sure what’ll keep it from happening again if I do. Can any of the work to this point be salvaged?

Thanks!
Lauren


#2

Hey everyone:

So I went ahead and deleted my working directory and ran it again as advised in the link but I got the exact same error. Can this be caused my something else, or is there another fix I can try?

Thanks guys!
Lauren


#3

Some first round questions:

  1. what version of fmriprep are you using?
  2. what environment are you running fmriprep (e.g. docker, singularity, manual install)
  3. finally, my shot in the dark question is what does the mask being passed into tcompcor look like?

#4

Hi all:

If anyone comes across this post with a similar error the solution for me was to rerun the participant from scratch after deleting the working directory AND the output directory. Unfortunately it didn’t seem like there was a way to save my progress up to that point but at least re-running the subject worked without changing any other aspects of the data or command.

Thanks for replying, @jdkent. Didn’t mean to waste your time.


#5

no problem, glad you found a solution!