External Email - Use Caution        

Dear FreeSurfer Developers,

I am using the following code on my department's HPC to (1) reconstruct a single participant’s T1w image and (2) perform brainstem segmentation.
The code works well, but I have 40 participants in total. Hence, I wonder how I can run recon-all and brainstem segmentation for multiple subjects in parallel. 
Could you tell me the code?

1) FreeSurfer version: --freesurfer-linux 8.2.0-1 on my department's HPC (high-performance cluster) 

2) My shell script for recon-all and brainstem segmentation for single subject:
#!/bin/bash
#$ -cwd
#$ -o /data/holly-host/UserName/logs/
#$ -j y
#$ -S /bin/bash
#$ -N reconall

export FREESURFER_HOME=/usr/local/freesurfer/8.2.0-1
export FS_LICENSE=/usr/local/freesurfer/8.2.0-1/license.txt
export SUBJECTS_DIR=/data/holly-host/hliu/freesurfer_subjects

source $FREESURFER_HOME/SetUpFreeSurfer.sh

mkdir -p $SUBJECTS_DIR

env | grep -E "FREESURFER|FS_LICENSE|SUBJECTS_DIR"

recon-all -all -i /data/holly-host/UserName/anat/sub-01_t1w.nii -s sub-01
SegmentAAN.sh sub-01

3) My command for submit the jobs to the cluster with 32 GB of RAM request

qsub -l vf=32G -l h_vmem=32G reconall

Thank you very much for your time and consideration, I look forward to hearing from you.

Best,
Huaiyu
_________________________________________
Huaiyu Liu (Ted)
Postdoctoral Research Fellow
Department of Imaging Neuroscience, Functional Imaging Laboratory
University College London
12 Queen Square, London WC1N 3AR