-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdo
executable file
·69 lines (61 loc) · 1.67 KB
/
do
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
NAME=evaluation
function run {
OCAMLRUNPARAM='b' /usr/bin/time -v -o time.temp ./$NAME.native "$1" 1>"$1/note"
cat time.temp >> "$1/note"
rm time.temp
}
function profile_time {
OCAMLRUNPARAM='b' /usr/bin/time -v -o time.temp perf record -g ./$NAME.p.native "$1" 1>"$1/note"
cat time.temp >> "$1/note"
rm time.temp
perf report -g
}
function clean {
ocamlbuild -clean
}
function deploy {
AWS=
VERSION=$(git log -1 --pretty=%h)
rsync -PaL *.ml Makefile do _tags schema.py *.gnuplot $AWS:src-$VERSION
}
function graphs_old {
gnuplot -e "set title 'Park'; set output 'park.ps'; mappa='mappa-weak.dat'; laplaw='lapla-weak-weak.dat'; laplas='lapla-strong-weak.dat';" ../png.gnuplot
gnuplot -e "set title 'Mall'; set output 'mall.ps'; mappa='mappa-strong.dat'; laplaw='lapla-weak-strong.dat'; laplas='lapla-strong-strong.dat';" ../png.gnuplot
gnuplot ../box-pp.gnuplot
laplaw=$(cat laplaw-err.dat)
laplas=$(cat laplas-err.dat)
echo $laplaw $laplas
gnuplot -e "set title 'Average Error'; set output 'boxes-err.ps'; mappa_strong='strong-mappa-err.dat'; mappa_weak='weak-mappa-err.dat'; laplaw=$laplaw; laplas=$laplas;" ../box-err.gnuplot
for i in $(ls *.ps); do ps2pdf -dEPSCrop $i; done
}
case "$1" in
run)
make clean
make native
run "$2"
;;
graphs)
./graphs "$2"
;;
profile)
make clean
make profile
profile_time "$2"
;;
query)
query
;;
deploy)
deploy
;;
*)
echo "Usage:
./do run <dir>
./do graphs <dir>
./do deploy
./do profile <dir>
./do query
"
;;
esac