-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_stress_test
executable file
·127 lines (117 loc) · 4.5 KB
/
run_stress_test
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/bin/bash
#
# Copyright 2010 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
NUMPARS=$#
PID=$$
LOG=`pwd`/log.$PID
SUM=`pwd`/summary.$PID
SCRATCH=.scratch.$PID
SIZE="UNKNOWN"
PWRMGMT=0
# change the tile clock frequency if using a tile clock divider other than 3
GHZ=0.533
PAR=1
while [ $PAR -le $NUMPARS ]; do
eval OPT=\$$PAR
case $OPT in
-S ) if [ $SIZE = "UNKNOWN" ]; then SIZE=SMALL; fi ;;
-M ) if [ $SIZE = "UNKNOWN" ]; then SIZE=MEDIUM; fi ;;
-L ) if [ $SIZE = "UNKNOWN" ]; then SIZE=LARGE; fi ;;
-PWRMGMT ) PWRMGMT=1 ;;
* ) echo Error, wrong option $OPT | tee -a $LOG | tee -a $SUM
exit ;;
esac
PAR=`expr $PAR + 1`
done
if [ $SIZE = "UNKNOWN" ]; then
echo ERROR: No size specified \(-S, -M, or -L\) | tee -a $LOG | tee -a $SUM
exit
else
echo Executing RCCE stress test of size $SIZE | tee -a $LOG | tee -a $SUM
fi
BIN_STRESS=/shared/`whoami`/bin_stress
if [ ! \( -d $BIN_STRESS \) ]; then
echo ERROR: No stress test directory | tee -a $LOG | tee -a $SUM
echo Please create and populate it by invoking \"build_stress_test\" \
| tee -a $LOG | tee -a $SUM
exit
fi
cd $BIN_STRESS
for HXT in 1tile nbr_tiles faraway_tiles; do
case $SIZE in
SMALL ) ITERS=10;;
MEDIUM ) ITERS=1000;;
LARGE ) ITERS=100000;;
esac
echo ./rccerun -nue 2 -f 2hosts_$HXT -clock $GHZ pingpong $ITERS \
| tee -a $LOG | tee -a $SUM
./rccerun -nue 2 -f 2hosts_$HXT -clock $GHZ pingpong $ITERS \
| tee -a $LOG | tee $SCRATCH
grep -i latency $SCRATCH >> $SUM
done
for EXT in "" "_1b"; do
if [ "$EXT" = "_1b" ]; then
echo Using single bit flags | tee -a $LOG | tee -a $SUM
fi
for HOSTS in allhosts allhosts_reverse; do
case $SIZE in
SMALL ) BTCORES=4; CLASS=S; STCORES=4; STITERS=10;;
MEDIUM ) BTCORES=16; CLASS=W; STCORES=16; STITERS=100;;
LARGE ) BTCORES=36; CLASS=W; STCORES=48; STITERS=1000;;
esac
echo ./rccerun -nue $STCORES -f $HOSTS -clock $GHZ stencil$EXT $STITERS \
| tee -a $LOG | tee -a $SUM
./rccerun -nue $STCORES -f $HOSTS -clock $GHZ stencil$EXT $STITERS \
| tee -a $LOG | tee $SCRATCH
grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
echo ./rccerun -nue $BTCORES -f $HOSTS -clock $GHZ bt.$CLASS.$BTCORES$EXT \
| tee -a $LOG | tee -a $SUM
./rccerun -nue $BTCORES -f $HOSTS -clock $GHZ bt.$CLASS.$BTCORES$EXT \
| tee -a $LOG | tee $SCRATCH
grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
done
if [ "$EXT" = "_1b" ]; then
echo End using single bit flags | tee -a $LOG | tee -a $SUM
fi
done
if [ $PWRMGMT -eq 1 ]; then
case $SIZE in
SMALL ) NC=1;;
MEDIUM ) NC=8 ;;
LARGE ) NC=48 ;;
esac
echo ./rccerun -nue $NC -f allhosts Fdiv 4 \
| tee -a $LOG | tee -a $SUM
./rccerun -nue $NC -f allhosts Fdiv 4 \
| tee -a $LOG | tee $SCRATCH
grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
echo ./rccerun -nue $NC -f allhosts FV 3 \
| tee -a $LOG | tee -a $SUM
./rccerun -nue $NC -f allhosts FV 3 \
| tee -a $LOG | tee $SCRATCH
grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
echo ./rccerun -nue $NC -f allhosts power_reset \
| tee -a $LOG | tee -a $SUM
./rccerun -nue $NC -f allhosts power_reset \
| tee -a $LOG | tee $SCRATCH
grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
echo ./rccerun -nue $NC -f allhosts pstencil \
| tee -a $LOG | tee -a $SUM
./rccerun -nue $NC -f allhosts pstencil \
| tee -a $LOG | tee $SCRATCH
grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
fi
rm $SCRATCH