Stuck at 'mri_vol2vol done' Stage in fMRIprep Analysis: Seeking Assistance

I’m attempting to use fmriprep to analyze my data, but when I run fmriprep, it gets stuck at a certain stage for a very long time (about 72 hours). My computer appears to be processing the data (I’m checking CPU usage), but the output has been stuck at 230804-21:59:32,468 nipype.interface INFO:stdout 2023-08-04T21:59:32.468628:mri_vol2vol done and it hasn’t progressed further. I’m not sure why this is happening.
this is my code:

# 创建一个包含参与者 ID 的列表
subject_ids=("02")

# 切换工作目录
cd "/Users/caofeizhen/Desktop/语义与词汇组合性/fMRI_data/fmri/code/fmriprep"

# 遍历每个参与者并运行 fmriprep_Scripted.sh 脚本
for subject in "${subject_ids[@]}"; do


  #User inputs:
  bids_root_dir=/Users/caofeizhen/Desktop/语义与词汇组合性/fMRI_data/fmri/RawData
  subj="${subject: -2}"
  echo $subj
  nthreads=8
  mem=20 #gb

  #Begin:

  #Convert virtual memory from gb to mb
  mem=`echo "${mem//[!0-9]/}"` #remove gb at end
  mem_mb=`echo $(((mem*1000)-5000))` #reduce some memory for buffer space during pre-processing

  #export TEMPLATEFLOW_HOME=$HOME/.cache/templateflow
  export FS_LICENSE=/Users/caofeizhen/Desktop/语义与词汇组合性/fMRI_data/fmri/RawData/derivatives/license.txt

  #Run fmriprep

  fmriprep-docker $bids_root_dir $bids_root_dir/derivatives \
    participant \
    --participant-label $subj \
    --skip-bids-validation \
    --md-only-boilerplate \
    --fs-license-file /Users/caofeizhen/Desktop/语义与词汇组合性/fMRI_data/fmri/RawData/derivatives/license.txt \
    --output-spaces MNI152NLin2009cAsym:res-2 \
    --nthreads $nthreads \
    --stop-on-first-crash \
    --mem_mb $mem_mb \
    --dummy-scans 6 \
    -w $HOME
done

My computer is macbook pro with m2 pro chip.

the rawdata file tree is:

.
├── anat
│   ├── sub-01_T1w.json
│   └── sub-01_T1w.nii.gz
├── func
│   ├── sub-01_task-Picture_run-01_bold.json
│   ├── sub-01_task-Picture_run-01_bold.nii.gz
│   ├── sub-01_task-Picture_run-01_events.tsv
│   ├── sub-01_task-Picture_run-02_bold.json
│   ├── sub-01_task-Picture_run-02_bold.nii.gz
│   ├── sub-01_task-Picture_run-02_events.tsv
│   ├── sub-01_task-Picture_run-03_bold.json
│   ├── sub-01_task-Picture_run-03_bold.nii.gz
│   ├── sub-01_task-Picture_run-03_events.tsv
│   ├── sub-01_task-Picture_run-04_bold.json
│   ├── sub-01_task-Picture_run-04_bold.nii.gz
│   ├── sub-01_task-Picture_run-04_events.tsv
│   ├── sub-01_task-Picture_run-05_bold.json
│   ├── sub-01_task-Picture_run-05_bold.nii.gz
│   ├── sub-01_task-Picture_run-05_events.tsv
│   ├── sub-01_task-Picture_run-06_bold.json
│   ├── sub-01_task-Picture_run-06_bold.nii.gz
│   ├── sub-01_task-Picture_run-06_events.tsv
│   ├── sub-01_task-Picture_run-07_bold.json
│   ├── sub-01_task-Picture_run-07_bold.nii.gz
│   ├── sub-01_task-Picture_run-07_events.tsv
│   ├── sub-01_task-Picture_run-08_bold.json
│   ├── sub-01_task-Picture_run-08_bold.nii.gz
│   ├── sub-01_task-Picture_run-08_events.tsv
│   ├── sub-01_task-Picture_run-09_bold.json
│   ├── sub-01_task-Picture_run-09_bold.nii.gz
│   ├── sub-01_task-Picture_run-09_events.tsv
│   ├── sub-01_task-Picture_run-10_bold.json
│   ├── sub-01_task-Picture_run-10_bold.nii.gz
│   ├── sub-01_task-Picture_run-10_events.tsv
│   ├── sub-01_task-Picture_run-11_bold.json
│   ├── sub-01_task-Picture_run-11_bold.nii.gz
│   ├── sub-01_task-Picture_run-11_events.tsv
│   ├── sub-01_task-Picture_run-12_bold.json
│   ├── sub-01_task-Picture_run-12_bold.nii.gz
│   ├── sub-01_task-Picture_run-12_events.tsv
│   ├── sub-01_task-Word_run-01_bold.json
│   ├── sub-01_task-Word_run-01_bold.nii.gz
│   ├── sub-01_task-Word_run-01_events.tsv
│   ├── sub-01_task-Word_run-02_bold.json
│   ├── sub-01_task-Word_run-02_bold.nii.gz
│   ├── sub-01_task-Word_run-02_events.tsv
│   ├── sub-01_task-Word_run-03_bold.json
│   ├── sub-01_task-Word_run-03_bold.nii.gz
│   ├── sub-01_task-Word_run-03_events.tsv
│   ├── sub-01_task-Word_run-04_bold.json
│   ├── sub-01_task-Word_run-04_bold.nii.gz
│   ├── sub-01_task-Word_run-04_events.tsv
│   ├── sub-01_task-Word_run-05_bold.json
│   ├── sub-01_task-Word_run-05_bold.nii.gz
│   ├── sub-01_task-Word_run-05_events.tsv
│   ├── sub-01_task-Word_run-06_bold.json
│   ├── sub-01_task-Word_run-06_bold.nii.gz
│   ├── sub-01_task-Word_run-06_events.tsv
│   ├── sub-01_task-Word_run-07_bold.json
│   ├── sub-01_task-Word_run-07_bold.nii.gz
│   ├── sub-01_task-Word_run-07_events.tsv
│   ├── sub-01_task-Word_run-08_bold.json
│   ├── sub-01_task-Word_run-08_bold.nii.gz
│   ├── sub-01_task-Word_run-08_events.tsv
│   ├── sub-01_task-Word_run-09_bold.json
│   ├── sub-01_task-Word_run-09_bold.nii.gz
│   ├── sub-01_task-Word_run-09_events.tsv
│   ├── sub-01_task-Word_run-10_bold.json
│   ├── sub-01_task-Word_run-10_bold.nii.gz
│   └── sub-01_task-Word_run-10_events.tsv
└── sub-01_scans.tsv

Hi @cfz,

I am going to guess that the 20 GB of RAM you are giving the command is not enough to process all of the 22 runs of data. Can you see if fMRIPrep finishes if you only process a few runs?

Best,
Steven

Thank you for the insightful suggestions and guidance you provided.it’s likely due to this reason. I tried using a computer with more memory and ran the fmriprep process locally, and didn’t encounter this issue. I successfully completed the preprocessing.