-
Notifications
You must be signed in to change notification settings - Fork 3
/
bench.sh
executable file
·60 lines (57 loc) · 1.33 KB
/
bench.sh
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
#!/bin/bash
stdlib="netlib netlibqap kenlib meslib pdslib raillib fctplib"
stdspecs="mmd rcm"
while getopts l:s:h name
do
case $name in
(l)
lib="$OPTARG";;
(s)
specs="$OPTARG";;
(h|?)
echo 'Call `bench.py` for test libray and specifications given'
echo 'as arguments.'
echo ''
echo 'Usage: bench.sh [-l lib] [-s specs]'
echo ''
echo 'Avaliable test library:'
echo ''
echo ' * netlib'
echo ' * netlibqap'
echo ' * kenlib'
echo ' * meslib'
echo ' * pdslib'
echo ' * raillib'
echo ' * fctplib'
echo ''
echo 'Avaliable specifications:'
echo ''
echo ' * mmd'
echo ' * rcm'
echo ''
echo 'If any argument is given it will run for all the library'
echo 'and specifications avaliable.'
exit 2;;
esac
done
if $(test ! -v lib)
then
lib=$stdlib
elif $(test -z $lib)
then
lib=$stdlib
fi
if $(test ! -v specs)
then
specs=$stdspecs
elif $(test -z $specs)
then
specs=$stdspecs
fi
for l in $lib
do
for s in $specs
do
python3 bench.py -K -o bench-$l-$s.out -S $s.specs -c --$l
done
done