Fmriprep stalling with no error message

Summary of what happened:

I am unable to run fmriprep without it stalling. I have checked my memory in docker and it should be fine (12GB). There is no error log and my BIDS files have been validated. They were covered from .IMA on a linux and then copied over the a MacOS where I am running fmriprep. I am not using a conda environment.

Command used (and if a helper script was used, a link to the helper script or the command generated):

chmod +x
source ~/.zprofile 


# Define variables

# Check if Docker is available
if [ -x "$(command -v docker)" ]; then
  fmriprep-docker $bids_root_dir $bids_root_dir/derivatives \
    participant \
    --participant-label $subj \
    --skip-bids-validation \
    --md-only-boilerplate \
    --fs-license-file $HOME/Downloads/license.txt \
    --output-spaces MNI152NLin2009cAsym:res-2 \
    --nthreads $nthreads \
    --stop-on-first-crash \
    --mem_mb $mem_mb \
    -w $HOME
  echo "Docker is not installed."



Environment (Docker, Singularity, custom installation):


Data formatted according to a validatable standard? Please provide the output of the validator:

Relevant log outputs (up to 20 lines):

This is the line where it stalled (for hours):
[Node] Executing "norm <niworkflows.interfaces.fixes.FixHeaderRegistration>

Screenshots / relevant information:

Hi @Andrea_Ellsay and welcome to neurostars!

We prefer if you keep your software support posts in compliance with the template, so I added it back in for you. You can see some information, importantly the BIDS validation output and fMRIPrep version, are missing. You can edit your post to add it back in.

Some other things:

This is not recommended, see here.

How long did you wait here? Can you share the full terminal output?

Can you report the output of the BIDS validator after removing –skip-bids-validation?

Finally, how much data do you have? If multiple runs and very large files, 8 GB as you restrict it could not be enough.


This is the bids folder.

And this is the bids validation

Looks good! In the future, outputs of the tree command are better at listing files than screenshots, as text can be parsed more easily. Similarly, better to copy and paste code output from the terminal into the text editor, using the </> button to format code easier to read.

How long have you tried waiting on that step?

1 Like

I waited only a couple hours but I did try to run it overnight and it stalled again with no error message at a different spot for over 10 hours.

What was this different spot? Also, is the original linux location a computing cluster? If so, why not run fMRIPrep there?

I am not sure what a computing cluster is but this is the current error I get when I try to run fmriprep on the linux.

-------- freesurfer-linux-ubuntu20_x86_64-7.3.2-20220804-6354275 --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /home/andrea/freesurfer
FSFAST_HOME       /home/andrea/freesurfer/fsfast
SUBJECTS_DIR      /home/andrea/freesurfer/subjects
MNI_DIR           /home/andrea/freesurfer/mni

(base) andrea-2:~$ /home/andrea/.local/lib/python3.10/site-packages/fmriprep-docker /home/andrea/data/bids /home/andrea/data/bids/derivatives participant –participant-label P001  --fs-license-file /home/andrea/data –fs-subjects-dir /home/andrea/freesurfer  
bash: /home/andrea/.local/lib/python3.10/site-packages/fmriprep-docker: No such file or directory

Earlier it said this error message: "Could not detect memory capacity of Docker container. Do you have permission to run docker?"

A computing cluster is a large computational resource, usually associated with a research center or institution, that one can use to submit intensive computational jobs. Most of them are linux-based, which is why I asked. On computing clusters, most non-root users (that is, not admins) do not have permission to run Docker. Instead, use Apptainer/Singularity:

First build the container:

cd /where/you/want/image/to/be
singularity build fmriprep_23.1.3.img docker://nipreps/fmriprep:23.1.3

then run with

singularity run -e --containall -B $HOME \
    /PATH/TO/fmriprep_23.1.3.img $bids_root_dir $bids_root_dir/derivatives \
    participant \
    --participant-label $subj \
    --skip-bids-validation \
    --md-only-boilerplate \
    --fs-license-file $HOME/Downloads/license.txt \
    --output-spaces MNI152NLin2009cAsym:res-2 \
    --nthreads $nthreads \
    --stop-on-first-crash \
    --mem_mb $mem_mb \
    -w $HOME

I have been trying to download Singularity but I run into this error. Go has been correctly installed into my /usr/local and the path has been added to ~/.bashrc

(base) andrea@winstonlab-2:~/singularity$ ./mconfig
make -C builddir
sudo make -C builddir install
Configuring for project `singularity-ce' with languages: C, Golang
=> running pre-basechecks project specific checks ...
=> running base system checks ...
 checking: host C compiler... cc
 checking: host C++ compiler... c++
 checking: host Go compiler (at least version 1.17)... not found!
mconfig: could not complete configuration
make: Entering directory '/home/andrea/singularity/builddir'
make: *** No targets specified and no makefile found.  Stop.
make: Leaving directory '/home/andrea/singularity/builddir'
make: Entering directory '/home/andrea/singularity/builddir'
make: *** No rule to make target 'install'.  Stop.
make: Leaving directory '/home/andrea/singularity/builddir'

You should go to your server admin for this kind of question, but often times singularity is available as a module. E.g., it would be among the options in module avail, which you can then load with module load NAMEOFMODULE.

1 Like