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

cd $sub_dir

8
9
for sub in `find 99*`
#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
17
18
#!/bin/bash

cd $sub_dir/$subject/

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

EOF
done

24
25
for sub in `find 99*`
#Test with 6 folders
Brent Womble's avatar
Brent Womble committed
26
27
28
29
30
do

#Submit jobs
pushd $jobs
echo "submitting segment job for $sub"
31
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
32
33
popd

34
done