Error in ica_aroma

Hello all,

I was using fmriprep v21.0.4 on ubuntu18.04. I added ‘–use-aroma’ in my command, and the following error occurred during the run:

[Node] Running "ica_aroma" ("niworkflows.interfaces.reportlets.segmentation.ICA_AROMARPT"), a CommandLine Interface with command:
ICA_AROMA.py -tr 2.000 -np -den nonaggr -i /work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/ica_aroma_wf/smooth/vol0000_xform-00000_clipped_merged_cut_smooth.nii.gz -m /work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/bold_std_trans_wf/_std_target_MNI152NLin6Asym.res2/mask_std_tfm/vol0000_xform-00000_clipped_merged_average_corrected_brain_mask_maths_trans.nii.gz -meldir /work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/ica_aroma_wf/melodic -mc /work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/bold_hmc_wf/normalize_motion/motion_params.txt -o /work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/ica_aroma_wf/ica_aroma/out
221018-17:19:15,768 nipype.workflow WARNING:
	 Storing result file without outputs
221018-17:19:15,771 nipype.workflow WARNING:
	 [Node] Error on "fmriprep_wf.single_subject_001_wf.func_preproc_ses_1_task_rest_wf.ica_aroma_wf.ica_aroma" (/work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/ica_aroma_wf/ica_aroma)
221018-17:19:17,478 nipype.workflow ERROR:
	 Node ica_aroma failed to run on host 9712878cbe33.
221018-17:19:18,73 nipype.workflow ERROR:
	 Saving crash info to /out/sub-001/log/20221018-123357_7c238fb6-55a5-4678-9056-0acada24def5/crash-20221018-171917-root-ica_aroma-3ee44c10-5ba6-46bd-ae3c-5433632b4f2d.txt
Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 530, in aggregate_outputs
    setattr(outputs, key, val)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
    value = super(File, self).validate(objekt, name, value, return_pathlike=True)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
    self.error(objekt, name, str(value))
  File "/opt/conda/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
    raise TraitError(
traits.trait_errors.TraitError: The 'nonaggr_denoised_file' trait of a _ICA_AROMAOutputSpecRPT instance must be a pathlike object or string representing an existing file, but a value of '/work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/ica_aroma_wf/ica_aroma/out/denoised_func_data_nonaggr.nii.gz' <class 'str'> was specified.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 429, in run
    runtime = self._post_run_hook(runtime)
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/interfaces/reportlets/segmentation.py", line 231, in _post_run_hook
    outputs = self.aggregate_outputs(runtime=runtime)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 537, in aggregate_outputs
    raise FileNotFoundError(msg)
FileNotFoundError: No such file or directory '/work/fmriprep_wf/single_subject_001_wf/func_preproc_ses_1_task_rest_wf/ica_aroma_wf/ica_aroma/out/denoised_func_data_nonaggr.nii.gz' for output 'nonaggr_denoised_file' of a ICA_AROMARPT interface

221018-17:19:19,406 nipype.workflow ERROR:
	 could not run node: fmriprep_wf.single_subject_001_wf.func_preproc_ses_1_task_rest_wf.ica_aroma_wf.ica_aroma
221018-17:19:19,496 nipype.workflow CRITICAL:
	 fMRIPrep failed: Workflow did not execute cleanly. Check log for details
221018-17:19:24,711 cli ERROR:
	 Preprocessing did not finish successfully. Errors occurred while processing data from participants: 001 (1). Check the HTML reports for details.
221018-17:19:24,711 cli ERROR:
	 Preprocessing did not finish successfully. Errors occurred while processing data from participants: 001 (1). Check the HTML reports for details.

Thank you for any help you can offer!
Jun

Hi Jun,

What is your full fMRIPrep command? Does the error persist when upgrading to the latest fMRIPrep version (22.0.2) and a using fresh working directory?

Best,
Steven

Hi Steven,

I changed my output path and working path. Here is my command:

sudo docker run -ti --rm
-v /mnt/hgfs/share/Nifti/project:/data:ro
-v /home/jun/project-derivatives:/out
-v /home/jun/project/work:/work
-v /home/jun/freesurfer/license.txt:/opt/freesurfer/license.txt
nipreps/fmriprep /data /out participant --participant-label 001 -w /work --use-aroma --dummy-scans 4

and an out of memory error has occurred:

Node: fmriprep_wf.single_subject_D040_wf.func_preproc_ses_1_task_rest_wf.ica_aroma_wf.calc_median_val
Working directory: /work/fmriprep_wf/single_subject_D040_wf/func_preproc_ses_1_task_rest_wf/ica_aroma_wf/calc_median_val

Node inputs:

args =
environ = {‘FSLOUTPUTTYPE’: ‘NIFTI_GZ’}
in_file =
index_mask_file =
mask_file =
op_string = -k %s -p 50
output_type = NIFTI_GZ
split_4d =

Traceback (most recent call last):
File “/opt/conda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py”, line 67, in run_node
result[“result”] = node.run(updatehash=updatehash)
File “/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py”, line 516, in run
result = self._run_interface(execute=True)
File “/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py”, line 635, in _run_interface
return self._run_command(execute)
File “/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py”, line 741, in _run_command
result = self._interface.run(cwd=outdir)
File “/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py”, line 428, in run
runtime = self._run_interface(runtime)
File “/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py”, line 822, in _run_interface
self.raise_exception(runtime)
File “/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py”, line 749, in raise_exception
raise RuntimeError(
RuntimeError: Command:
fslstats /work/fmriprep_wf/single_subject_D040_wf/func_preproc_ses_1_task_rest_wf/bold_std_trans_wf/_std_target_MNI152NLin6Asym.res2/merge/vol0000_xform-00000_clipped_merged_cut.nii.gz -k /work/fmriprep_wf/single_subject_D040_wf/func_preproc_ses_1_task_rest_wf/bold_std_trans_wf/_std_target_MNI152NLin6Asym.res2/mask_std_tfm/vol0000_xform-00000_clipped_merged_average_corrected_brain_mask_maths_trans.nii.gz -p 50
Standard output:

Standard error:
Image Exception : #99 :: Out of memory
Out of memory
Return code: 255

I think it may be due to insufficient memory (docker info: CPUs: 16 Total Memory: 7.765GiB) because it works well on another computer using the same fmriprep version and similar command.
BTW I install fmriprep a few days ago using the command: docker pull nipreps/fmriprep and default tag: latest, but it was not v22.0.2 instead of v21.0.4.

Many thanks!
Jun

Hi,

You can install 22.0.2 with docker pull nipreps/fmriprep:22.0.2.

Yes, 8 GB is not a lot of memory, especially when you have 16 CPUs working.

Best,
Steven