cheaha_vessels_segment.sh 603 Bytes
Newer Older
Brent Womble's avatar
Brent Womble committed
1
#!/bin/bash
2
jobs=/data/scratch/kecannon/brainhack2018/jobs3_HCP
3
sub_dir=/data/scratch/kecannon/brainhack2018/HCP
Brent Womble's avatar
Brent Womble committed
4
5
6
7
mkdir $jobs

cd $sub_dir

8
for sub in `find * -type d`
Brent Womble's avatar
Brent Womble committed
9
10
11
do

#Create job script files
12
cat > $jobs/segment_$sub.sh <<EOF
Brent Womble's avatar
Brent Womble committed
13
14
15
#!/bin/bash

module load rc/matlab/R2013a
16
matlab -nodesktop -nosplash -r "cheaha_vessels_segment('$sub_dir','$sub')"
Brent Womble's avatar
Brent Womble committed
17
18
19
20

EOF
done

21
for sub in `find * -type d`
Brent Womble's avatar
Brent Womble committed
22
23
24
25
26
do

#Submit jobs
pushd $jobs
echo "submitting segment job for $sub"
27
sbatch --job-name=segment_$sub --output=segment_$sub.txt --ntasks=1 --partition=short --mem-per-cpu=9192 --time=12:00:00 segment_$sub.sh 
Brent Womble's avatar
Brent Womble committed
28
29
popd

30
done