QSIPREP configures pipelines for processing diffusion-weighted MRI (dMRI) data.
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 qsiprep [user@cn3144 ~]$ qsiprep -h [user@cn3144 ~]$ exit salloc.exe: Relinquishing job allocation 46116226 [user@biowulf ~]$
Create a batch input file (e.g. qsiprep.sh). For example:
#!/bin/bash # sbatch --gres=lscratch:100 --mem=32g --cpus-per-task=48 --time=72:00:00 qsiprep.sh set -e function fail { echo "FAIL: $@" >&2 exit 1 # signal failure } module load qsiprep qsiprep /data/$USER/ds000114-download /data/$USER/qsiprep.out.ds001 \ participant --participant_label sub-02 -w /lscratch/$SLURM_JOB_ID \ --notrack --nthreads $SLURM_CPUS_PER_TASK --mem_mb $SLURM_MEM_PER_NODE \ --stop-on-first-crash --output-resolution 1.2
Submit this job using the Slurm sbatch command.
sbatch [--gres=lscratch:#] [--cpus-per-task=#] [--mem=#] qsiprep.sh
Create a swarmfile (e.g. qsiprep.swarm). For example:
export TMPDIR=/lscratch/$SLURM_JOB_ID; \ mkdir -p $TMPDIR/out; \ mkdir -p $TMPDIR/wrk; \ qsiprep /data/$USER/ds000114-download $TMPDIR/out \ participant --participant_label sub-01 -w $TMPDIR/wrk \ --notrack --nthreads $SLURM_CPUS_PER_TASK \ --mem_mb $SLURM_MEM_PER_NODE --stop-on-first-crash --output-resolution 1.2; \ mv $TMPDIR/out /data/$USER/QSIPREP.out.s001 export TMPDIR=/lscratch/$SLURM_JOB_ID; \ mkdir -p $TMPDIR/out; \ mkdir -p $TMPDIR/wrk; \ qsiprep /data/$USER/ds000114-download $TMPDIR/out \ participant --participant_label sub-02 -w $TMPDIR/wrk \ --notrack --nthreads $SLURM_CPUS_PER_TASK \ --mem_mb $SLURM_MEM_PER_NODE --stop-on-first-crash --output-resolution 1.2; \ mv $TMPDIR/out /data/$USER/QSIPREP.out.s002
Submit this job using the swarm command.
swarm -f qsiprep.swarm [--gres=lscratch:#] [-g #] [-t #] --module qsiprepwhere
-gres=lscratch:# | Number of Gigabytes of local disk space allocated per process (1 line in the swarm command file) |
-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 qsiprep | Loads the qsiprep module for each subjob in the swarm |