Biowulf High Performance Computing at the NIH
Fmriprep on Biowulf

Fmriprep is an fMRI data preprocessing pipeline that produces an output that can be submitted to a variety of group-level analyses, including task-based and resting-state fMRI, graph thoeretical metrics, and surface or volume-based statistics. Some of the preprocessing steps performed by fmriprep include coregistration, normalization, unwarpinmg, noise component extraction, segmentation, and skullstripping.

Web site

Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program.
Sample session (user input in bold):

[user@biowulf]$ sinteractive
salloc.exe: Pending job allocation 46116226
salloc.exe: job 46116226 queued and waiting for resources
salloc.exe: job 46116226 has been allocated resources
salloc.exe: Granted job allocation 46116226
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3144 are ready for job

[user@cn3144 ~]$ module load fmriprep

[user@cn3144 ~]$ fmriprep -h

[user@cn3144 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$

Batch job
Most jobs should be run as batch jobs.

Create a batch input file (e.g. For example:


export TMPDIR=/lscratch/$SLURM_JOB_ID

module load fmriprep
fmriprep ds001/ fmriprep.out.ds001 participant --participant_label sub-01 -w --use-aroma -vvvv

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=#] [--mem=#]
Swarm of Jobs
A swarm of jobs is an easy way to submit a set of independent commands requiring identical resources.

Create a swarmfile (e.g. fmriprep_jobs.swarm). For example:

fmriprep ds001/ fmriprep.out.ds001 participant --participant_label sub-01 -w --use-aroma  
fmriprep ds001/ fmriprep.out.ds001 participant --participant_label sub-02 -w --use-aroma 
fmriprep ds001/ fmriprep.out.ds001 participant --participant_label sub-03 -w --use-aroma 

Submit this job using the swarm command.

swarm -f fmriprep_jobs.swarm [-g #] [-t #] --module fmriprep
-g # Number of Gigabytes of memory required for each process (1 line in the swarm command file)
-t # Number of threads/CPUs required for each process (1 line in the swarm command file).
--module fmriprep Loads the fmriprep module for each subjob in the swarm