cheaha_vessels_segment.sh 649 Bytes
Newer Older
Brent Womble's avatar
Brent Womble committed
1
#!/bin/bash
2
jobs=/data/scratch/kecannon/brainhack2018/jobs1_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 99* -type d`
9
#Test with 6 folders
Brent Womble's avatar
Brent Womble committed
10
11
12
do

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

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

EOF
done

22
for sub in `find 99* -type d`
23
#Test with 6 folders
Brent Womble's avatar
Brent Womble committed
24
25
26
27
28
do

#Submit jobs
pushd $jobs
echo "submitting segment job for $sub"
29
sbatch --job-name=segment_$sub --output=segment_$sub.txt --ntasks=1 --partition=long --mem-per-cpu=4096 --time=150:00:00 segment_$sub.sh 
Brent Womble's avatar
Brent Womble committed
30
31
popd

32
done