4 MACHINELIST='dc-1.calit2.uci.edu dc-2.calit2.uci.edu dc-3.calit2.uci.edu dc-4.calit2.uci.edu dc-5.calit2.uci.edu dc-6.calit2.uci.edu dc-7.calit2.uci.edu dc-8.calit2.uci.edu'
5 benchmarks='lookup 40962dconv 1200mmver moldynverB'
7 LOGDIR=~/research/Robust/src/Benchmarks/Prefetch/runlog
14 while [ $i -lt $1 ]; do
15 echo "$DIR" > ~/.tmpdir
16 echo "bin=$3" > ~/.tmpvars
19 for j in $MACHINELIST; do
20 if [ $ct -lt $2 ]; then
21 if [ "$j" != "$HOSTNAME" ]; then
22 MACHINES="$MACHINES $j"
50 for machine in `echo $MACHINES`
52 ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' &
56 perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl clear_stats settings=switch/clearsettings.txt
57 /usr/bin/time -f "%e" ./$3 master $arg 2> ${LOGDIR}/tmp
58 perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl settings=switch/settings.txt
59 cat ${LOGDIR}/tmp >> ${LOGDIR}/${2}Thrd_${3}_${EXTENSION}.txt
60 if [ $i -eq 0 ];then echo "<h3> Benchmark=${3} Thread=${2} Extension=${EXTENSION}</h3><br>" > ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html ;fi
61 cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
62 echo "<a href=\"${2}Thrd_${3}_${EXTENSION}_${i}.html\">Network Stats</a><br>" >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
63 mv ${TOPDIR}/html/dell.html ${LOGDIR}/${2}Thrd_${3}_${EXTENSION}_${i}.html
64 echo "Terminating ... "
65 for machine in `echo $MACHINES`
67 ssh ${machine} 'source ~/.tmpvars; killall $bin'
77 while [ $i -lt $1 ]; do
78 echo "$DIR" > ~/.tmpdir
79 echo "bin=$3" > ~/.tmpvars
80 echo "arg='$ARGS1'" > ~/.tmpargs
81 echo "logd=$LOGDIR" > ~/.tmplogdir
82 echo "ext=$EXTENSION" > ~/.tmpext
84 ssh $MACHINES2 'cd `cat ~/.tmpdir`; source ~/.tmpvars; source ~/.tmpargs; source ~/.tmplogdir; source ~/.tmpext; /usr/bin/time -f "%e" ./$bin master $arg 2>> ${logd}/${bin}_remote_${ext}.txt'
85 echo "Terminating ... "
94 #while [ $i -lt $1 ]; do
95 # /usr/bin/time -f "%e" ./${NONPREFETCH} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH}_local_${EXTENSION}.txt
100 while [ $i -lt $1 ]; do
101 /usr/bin/time -f "%e" ./${NONPREFETCH_NONCACHE} master $ARGS1 2> ${LOGDIR}/tmp
102 cat ${LOGDIR}/tmp >> ${LOGDIR}/${NONPREFETCH_NONCACHE}_local_${EXTENSION}.txt
103 if [ $i -eq 0 ];then echo "<h3> Benchmark=${NONPREFETCH_NONCACHE} Thread=1local Extension=${EXTENSION}</h3><br>" > ${LOGDIR}/${NONPREFETCH_NONCACHE}_${EXTENSION}_1local_a.html ;fi
104 cat ${LOGDIR}/tmp >> ${LOGDIR}/${NONPREFETCH_NONCACHE}_${EXTENSION}_1local_a.html
105 echo "<br>" >> ${LOGDIR}/${NONPREFETCH_NONCACHE}_${EXTENSION}_1local_a.html
112 PREFETCH=${BENCHMARK}N.bin
113 NONPREFETCH=${BENCHMARK}NP.bin
114 NONPREFETCH_NONCACHE=${BENCHMARK}NPNC.bin
118 echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
121 echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
122 # oneremote 1 1 $NONPREFETCH_NONCACHE
123 echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
124 # oneremote 1 1 $NONPREFETCH
125 echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
126 # oneremote 1 1 $PREFETCH
131 echo "------- Running $count threads $BMDIR non-prefetch + non-cache on $count machines -----"
132 run 1 $count $NONPREFETCH_NONCACHE
133 echo "------- Running $count threads $BMDIR prefetch on $count machines -----"
134 run 1 $count $PREFETCH
140 function callrunjavasingle {
141 JAVASINGLE=${BENCHMARK}.bin
145 echo "-----------Running javasingle for ${BENCHMARK} version ${EXTENSION} on 1 machines ------------"
150 function javasinglerun {
152 while [ $i -lt $1 ]; do
153 /usr/bin/time -f "%e" ./${BENCHMARK}.bin $ARGS1 2> ${LOGDIR}/tmp
154 cat ${LOGDIR}/tmp >> ${LOGDIR}/${BENCHMARK}_javasingle_${EXTENSION}.txt
155 if [ $i -eq 0 ];then echo "<h3> Benchmark=${BENCHMARK} Thread=1java Extension=${EXTENSION}</h3><br>" > ${LOGDIR}/${BENCHMARK}_${EXTENSION}_1java_a.html ;fi
156 cat ${LOGDIR}/tmp >> ${LOGDIR}/${BENCHMARK}_${EXTENSION}_1java_a.html
157 echo "<br>" >> ${LOGDIR}/${BENCHMARK}_${EXTENSION}_1java_a.html
163 function callmicrorun {
164 PREFETCH=${BENCHMARK}1.bin
165 NONPREFETCH=${BENCHMARK}1NP.bin
166 NONPREFETCH_NONCACHE=${BENCHMARK}1NPNC.bin
168 echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
170 echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
171 oneremote 10 1 $NONPREFETCH_NONCACHE
172 echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
173 oneremote 10 1 $NONPREFETCH
174 echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
175 oneremote 10 1 $PREFETCH
180 echo "---------- Clean old files ---------- "
182 for b in `echo $benchmarks`
185 BENCHMARK=`echo $bm | cut -f1 -d":"`
186 BMDIR=`echo $bm | cut -f2 -d":"`
187 ARGS1=`echo $bm | cut -f3 -d":"`
188 ARGS2=`echo $bm | cut -f4 -d":"`
189 ARGS3=`echo $bm | cut -f5 -d":"`
190 ARGS4=`echo $bm | cut -f6 -d":"`
191 ARGS5=`echo $bm | cut -f7 -d":"`
192 ARGS6=`echo $bm | cut -f8 -d":"`
193 ARGS7=`echo $bm | cut -f9 -d":"`
194 ARGS8=`echo $bm | cut -f10 -d":"`
195 EXTENSION=`echo $bm | cut -f11 -d":"`
198 if [ $b == $name1 ] || [ $b == $name2 ]; then
206 #----------Calulates the averages -----------
207 for file in `ls runlog/*.txt`
209 echo -n $file >> average.txt
210 cat $file | grep -v "^Command" | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
212 echo "===========" >> average.txt
213 echo "" >> average.txt