-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.sh
More file actions
50 lines (31 loc) · 1.05 KB
/
submit.sh
File metadata and controls
50 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
WORKDIR=${PWD}
BASEDIR=${WORKDIR}/output
LOGDIR=${BASEDIR}/log
mkdir -p ${LOGDIR}
SCRIPTDIR=${BASEDIR}/script
mkdir -p ${SCRIPTDIR}
DIRS=(BarrelSurveyFar_TB3 BarrelSurveyRings_TB3 BottomCornerSurvey_TB3 BottomSurvey_TB3 TopCornerSurvey_TB3 TopSurvey_TB3)
CONFIGS=(images blurry veryblurry)
rootpath=/project/rpp-blairt2k/public_html/TOW-Feb2020/Processed
for dir in ${DIRS[@]}; do
for config in ${CONFIGS[@]}; do
path=${rootpath}/${dir}/*/${config}
basename=${dir}_${config}
SUBFILE=${SCRIPTDIR}/${basename}.sh
cat > ${SUBFILE}<<EOF
#!/bin/bash
#SBATCH --job-name=${basename}
#SBATCH --cpus-per-task=32 # CPU cores/threads
#SBATCH --mem=120G # memory per node
#SBATCH --time=0-00:30 # time (DD-HH:MM)
#SBATCH --account=rpp-blairt2k
#SBATCH --output=${LOGDIR}/${basename}.log
#SBATCH --error=${LOGDIR}/${basename}.log
cd ${WORKDIR}
source setup.sh
time ipython -c "%run BlurDetection.py -o ${BASEDIR}/${dir}_${config}.txt -i \"${path}/\*.jpg\""
EOF
sbatch ${SUBFILE}
done
done