-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·51 lines (40 loc) · 933 Bytes
/
run.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
#!/bin/sh
export XTENSA_DIR=/home/hrniels/Applications/xtensa
export GEM5_DIR=/home/hrniels/m3bench/m3/hw/gem5
M3_GEM5_OUT=${M3_GEM5_OUT:-run}
if [ $# -ne 5 ]; then
echo "Usage: $0 <name> <benchs> <posts> <plots> <jobs>" 1>&2
exit 1
fi
if [ "$M3_TARGET" = "" ]; then
echo "Please define M3_TARGET first." 1>&2
exit 1
fi
case $M3_TARGET in
t3)
export M3_LOG=run/xtsc.log
export LX_ARCH=xtensa LX_PLATFORM=xtensa LX_BUILD=release
;;
gem5)
export M3_LOG=$M3_GEM5_OUT/gem5.log
export LX_ARCH=x86_64 LX_PLATFORM=gem5 LX_BUILD=release
;;
esac
name=$1
benchs=$2
posts=$3
plots=$4
mkdir -p results
res=$(readlink -f results/$name)
mkdir -p $res
# increase number of file descriptors
ulimit -n 16384
for b in $benchs; do
./benchs/$b.sh $res $5
done
for p in $posts; do
./plots/$p/post.sh $res
done
for p in $plots; do
./plots/$p/plot.sh $res
done