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='40962dconv 1200mmver moldynverB'
6 benchmarks='1152fft2d 40962dconv 10lookup 1200mmver moldynverB rainforest'
8 LOGDIR=~/research/Robust/src/Benchmarks/Prefetch/ManualPrefetch/runlog
15 while [ $i -lt $1 ]; do
16 echo "$DIR" > ~/.tmpdir
17 echo "bin=$3" > ~/.tmpvars
20 for j in $MACHINELIST; do
21 if [ $ct -lt $2 ]; then
22 if [ "$j" != "$HOSTNAME" ]; then
23 MACHINES="$MACHINES $j"
30 DSTMDIR=${HOME}/research/Robust/src/Benchmarks/Prefetch/config
33 ln -s ${DSTMDIR}/dstm_2.conf dstm.conf
37 ln -s ${DSTMDIR}/dstm_3.conf dstm.conf
41 ln -s ${DSTMDIR}/dstm_4.conf dstm.conf
45 ln -s ${DSTMDIR}/dstm_5.conf dstm.conf
49 ln -s ${DSTMDIR}/dstm_6.conf dstm.conf
53 ln -s ${DSTMDIR}/dstm_7.conf dstm.conf
57 ln -s ${DSTMDIR}/dstm_8.conf dstm.conf
60 for machine in `echo $MACHINES`
62 ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' &
67 # perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl clear_stats settings=switch/clearsettings.txt
68 /usr/bin/time -f "%e" ./${3} master $arg 2> ${LOGDIR}/tmp
69 # perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl settings=switch/settings.txt
70 cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}.txt
71 if [ $i -eq 0 ];then echo "<h3> Benchmark=${3} Thread=${2} Extension=${EXTENSION}</h3><br>" > ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html ;fi
72 cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
73 # echo "<a href=\"${3}_${2}Thrd_${EXTENSION}_${i}.html\">Network Stats</a><br>" >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
74 # mv ${TOPDIR}/html/dell.html ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}_${i}.html
75 echo "Terminating ... "
76 for machine in `echo $MACHINES`
78 ssh ${machine} 'source ~/.tmpvars; killall $bin'
86 MANUAL_PREFETCH=${BENCHMARK}RangeN.bin
92 echo "------- Running $count threads $BMDIR manual prefetch on $count machines -----"
93 run 1 $count ${MANUAL_PREFETCH}
100 echo "---------- Clean old files ---------- "
102 for b in `echo $benchmarks`
105 BENCHMARK=`echo $bm | cut -f1 -d":"`
106 BMDIR=`echo $bm | cut -f2 -d":"`
107 ARGS1=`echo $bm | cut -f3 -d":"`
108 ARGS2=`echo $bm | cut -f4 -d":"`
109 ARGS3=`echo $bm | cut -f5 -d":"`
110 ARGS4=`echo $bm | cut -f6 -d":"`
111 ARGS5=`echo $bm | cut -f7 -d":"`
112 ARGS6=`echo $bm | cut -f8 -d":"`
113 ARGS7=`echo $bm | cut -f9 -d":"`
114 ARGS8=`echo $bm | cut -f10 -d":"`
115 EXTENSION=`echo $bm | cut -f11 -d":"`
119 #----------Calulates the averages -----------
120 for file in `ls runlog/*.txt`
122 echo -n $file >> average.txt
123 cat $file | grep -v "^Command" | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
125 echo "===========" >> average.txt
126 echo "" >> average.txt