Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Workflow did not execute cleanly' Error [MRIQC] #654

Closed
sadevp opened this issue Oct 16, 2017 · 8 comments
Closed

'Workflow did not execute cleanly' Error [MRIQC] #654

sadevp opened this issue Oct 16, 2017 · 8 comments

Comments

@sadevp
Copy link

sadevp commented Oct 16, 2017

Hello,

Please see the error logs when running MRIQC on this dataset: https://openneuro.org/datasets/ds001105/versions/00001

I am receive an error saying that 'workflow did not execute cleanly', followed by Error Response from Daemon: No Such Container. This may be related to this issue: OpenNeuroOrg/openneuro#131

Here is what the error says:

Traceback (most recent call last):
File "/usr/local/miniconda/bin/mriqc", line 11, in
load_entry_point('mriqc==0.9.8.post1', 'console_scripts', 'mriqc')()
File "/usr/local/miniconda/lib/python3.6/site-packages/mriqc/bin/mriqc_run.py", line 325, in main
workflow.run(**plugin_settings)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/workflows.py", line 590, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/base.py", line 279, in run
report_nodes_not_run(notrun)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/base.py", line 101, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details
Error response from daemon: No such container: 375151cb-721a-4abb-a6fe-ca187b71ead1-lock
No lock found for 375151cb-721a-4abb-a6fe-ca187b71ead1

@chrisgorgo
Copy link
Collaborator

To dive deeper into MRIQC issues you can look into the logs sub directory
image

From that crash file you will learn that the specific error is:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 52, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 372, in run
    self._run_interface()
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 482, in _run_interface
    self._result = self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 613, in _run_command
    result = self._interface.run()
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1083, in run
    runtime = self._run_wrapper(runtime)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1757, in _run_wrapper
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/common/report.py", line 53, in _run_interface
    ReportCapableInterface, self)._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1791, in _run_interface
    self.raise_exception(runtime)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1715, in raise_exception
    **runtime.dictcopy()))
RuntimeError: Command:
melodic -i /usr/local/src/mriqc/work/workflow_enumerator/funcMRIQC/_in_file_..snapshot..data..sub-013..func..sub-013_task-mentalstates_run-3_bold.nii.gz/reorient_and_discard/sub-013_task-mentalstates_run-3_bold.nii.gz --nobet --nomask --no_mm -o /usr/local/src/mriqc/work/workflow_enumerator/funcMRIQC/_in_file_..snapshot..data..sub-013..func..sub-013_task-mentalstates_run-3_bold.nii.gz/ICA
Standard output:

Standard error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

bad_alloc means that the app was not able to allocate enough memory. This unfortuantelly happens with MRIQC when the ICA option is turned on and we don't have a good way to avoid it. Try running it without ICA option.

@sadevp
Copy link
Author

sadevp commented Nov 1, 2017

I received this error again after running this dataset: https://openneuro.org/datasets/ds000011/versions/00001?app=MRIQC&version=46&job=f5e0feed-96f7-41fc-ab29-5fc6f1225431

I did not have the ICA option turned on. You can see that the error only appears for one of the participants.

screen shot 2017-11-01 at 3 02 36 pm

@chrisgorgo
Copy link
Collaborator

@sadevp

This seems to me like a completely different error:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 51, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 407, in run
    self._run_interface()
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 517, in _run_interface
    self._result = self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 650, in _run_command
    result = self._interface.run()
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1086, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
    out = function_handle(**args)
  File "<string>", line 10, in reorient_and_discard_non_steady
  File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/funcs.py", line 225, in as_closest_canonical
    arr = img.get_data()
  File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/spatialimages.py", line 572, in get_data
    data = np.asanyarray(self._dataobj)
  File "/usr/local/miniconda/lib/python3.6/site-packages/numpy/core/numeric.py", line 583, in asanyarray
    return array(a, dtype, copy=False, order=order, subok=True)
  File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/arrayproxy.py", line 145, in __array__
    raw_data = self.get_unscaled()
  File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/arrayproxy.py", line 140, in get_unscaled
    mmap=self._mmap)
  File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/volumeutils.py", line 524, in array_from_file
    n_read = infile.readinto(data_bytes)
  File "/usr/local/miniconda/lib/python3.6/gzip.py", line 276, in read
    return self._buffer.read(size)
  File "/usr/local/miniconda/lib/python3.6/_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "/usr/local/miniconda/lib/python3.6/gzip.py", line 471, in read
    uncompress = self._decompressor.decompress(buf, size)
zlib.error: Error -3 while decompressing data: invalid block type

@sadevp
Copy link
Author

sadevp commented Nov 1, 2017

I was citing the error at the end of the error log. Should I create a new issue for the error you've identified above?

@chrisgorgo
Copy link
Collaborator

The error at the end of the log indicates that something went wrong, but unfortunately many things can go wrong. With MRIQC it's easiest to look at the crashfiles in results. In this case the error indicates that this file sub-09/func/sub-09_task-Classificationprobewithoutfeedback_bold.nii.gz is corrupted. Could you dig a bit more into this and figure out if the version on OpenNeuro is corrupted (just open it and read it in nibabel - get_data()) or the source data that you uploaded is corrupted?

@sadevp
Copy link
Author

sadevp commented Nov 2, 2017

The original file on openfmri appears to be corrupted, after trying to run in nibabel, I get this error:

Traceback (most recent call last):
File "", line 1, in
File "/Applications/anaconda/lib/python3.6/site-packages/nibabel/dataobj_images.py", line 202, in get_data
data = np.asanyarray(self._dataobj)
File "/Applications/anaconda/lib/python3.6/site-packages/numpy/core/numeric.py", line 583, in asanyarray
return array(a, dtype, copy=False, order=order, subok=True)
File "/Applications/anaconda/lib/python3.6/site-packages/nibabel/arrayproxy.py", line 290, in array
raw_data = self.get_unscaled()
File "/Applications/anaconda/lib/python3.6/site-packages/nibabel/arrayproxy.py", line 285, in get_unscaled
mmap=self._mmap)
File "/Applications/anaconda/lib/python3.6/site-packages/nibabel/volumeutils.py", line 524, in array_from_file
n_read = infile.readinto(data_bytes)
File "/Applications/anaconda/lib/python3.6/gzip.py", line 276, in read
return self._buffer.read(size)
File "/Applications/anaconda/lib/python3.6/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/Applications/anaconda/lib/python3.6/gzip.py", line 471, in read
uncompress = self._decompressor.decompress(buf, size)
zlib.error: Error -3 while decompressing data: invalid block type

img.get_data()

@oesteban
Copy link
Member

oesteban commented Nov 2, 2017

I reported this feature request to the bids-validator repo: https://github.com/INCF/bids-validator/issues/297

But yes, that file should be revised in openfmri (and fix it if possible).

@chrisgorgo
Copy link
Collaborator

@sadevp please bring this up with @suyashdb so it will not get lost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants