-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun-all.sh
executable file
·47 lines (38 loc) · 1.08 KB
/
run-all.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
#!/bin/bash
NCORES=(01 02 04 08 16 20 32 40 64)
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "Hello, unprivileged user. One needs super user power here."
exit 1
fi
modprobe msr
# set working directory = script's directory
# this is useful to run the script from ssh
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd $DIR
for dir in */;
do
if [ "x$dir" == "x`grep ${dir} blacklist.txt`" ]; then
continue
fi
cd $dir
make clean && ./configure.sh && make bench && mkdir -p out
if [ $? -ne 0 ]; then
echo
echo "Failed to compile benchmark in \"$dir\". Skipping."
echo
cd ..
continue
fi
for i in ${NCORES[*]};
do
echo
echo "Running benchmark in \"$dir\" with N=$i: start"
echo
./run-bench.sh $i > out/bench-$i.txt
echo
echo "Running benchmark in \"$dir\": done"
echo
done
cat out/bench*.txt | sed -ne '/time\|iters/p' | sed 's/([^)]*)//g' | grep -o '[0-9]\+\.\?[0-9]*' | sed '$!N;s/\n/ /' >> `date '+%Y%m%d_%H%M%S'`-bench-summary.txt
cd ..
done