#set -x
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'
-#benchmarks='40962dconv 1200mmver moldynverB'
+#benchmarks='40962dconv 1200mmver moldynverB 1600fft2d 1152fft2d 10lookup rainforest'
+#benchmarks='40962dconv'
#benchmarks='10lookup'
benchmarks='rainforest'
done
rm dstm.conf
- DSTMDIR=${HOME}/research/Robust/src
+ DSTMDIR=${HOME}/research/Robust/src/Benchmarks/Prefetch/config
if [ $2 -eq 2 ]; then
arg=$ARGS2
ln -s ${DSTMDIR}/dstm_2.conf dstm.conf
perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl clear_stats settings=switch/clearsettings.txt
/usr/bin/time -f "%e" ./$3 master $arg 2> ${LOGDIR}/tmp
perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl settings=switch/settings.txt
- cat ${LOGDIR}/tmp >> ${LOGDIR}/${2}Thrd_${3}_${EXTENSION}.txt
+ cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}.txt
if [ $i -eq 0 ];then echo "<h3> Benchmark=${3} Thread=${2} Extension=${EXTENSION}</h3><br>" > ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html ;fi
cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
- echo "<a href=\"${2}Thrd_${3}_${EXTENSION}_${i}.html\">Network Stats</a><br>" >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
- mv ${TOPDIR}/html/dell.html ${LOGDIR}/${2}Thrd_${3}_${EXTENSION}_${i}.html
+ echo "<a href=\"${3}_${2}Thrd_${EXTENSION}_${i}.html\">Network Stats</a><br>" >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
+ mv ${TOPDIR}/html/dell.html ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}_${i}.html
echo "Terminating ... "
for machine in `echo $MACHINES`
do
done
}
+function runallstats {
+ i=0;
+ DIR=`pwd`
+ HOSTNAME=`hostname`
+ while [ $i -lt $1 ]; do
+ echo "$DIR" > ~/.tmpdir
+ echo "bin=$3" > ~/.tmpvars
+ ct=0
+ MACHINES=''
+ for j in $MACHINELIST; do
+ if [ $ct -lt $2 ]; then
+ if [ "$j" != "$HOSTNAME" ]; then
+ MACHINES="$MACHINES $j"
+ fi
+ fi
+ let ct=$ct+1
+ done
+
+ rm dstm.conf
+ DSTMDIR=${HOME}/research/Robust/src/Benchmarks/Prefetch/config
+ if [ $2 -eq 2 ]; then
+ arg=$ARGS2
+ ln -s ${DSTMDIR}/dstm_2.conf dstm.conf
+ fi
+ if [ $2 -eq 3 ]; then
+ arg=$ARGS3
+ ln -s ${DSTMDIR}/dstm_3.conf dstm.conf
+ fi
+ if [ $2 -eq 4 ]; then
+ arg=$ARGS4
+ ln -s ${DSTMDIR}/dstm_4.conf dstm.conf
+ fi
+ if [ $2 -eq 5 ]; then
+ arg=$ARGS5
+ ln -s ${DSTMDIR}/dstm_5.conf dstm.conf
+ fi
+ if [ $2 -eq 6 ]; then
+ arg=$ARGS6
+ ln -s ${DSTMDIR}/dstm_6.conf dstm.conf
+ fi
+ if [ $2 -eq 7 ]; then
+ arg=$ARGS7
+ ln -s ${DSTMDIR}/dstm_7.conf dstm.conf
+ fi
+ if [ $2 -eq 8 ]; then
+ arg=$ARGS8
+ ln -s ${DSTMDIR}/dstm_8.conf dstm.conf
+ fi
+ chmod +x ~/.tmpvars
+ for machine in `echo $MACHINES`
+ do
+ ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' &
+ echo ""
+ done
+ sleep 2
+ perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl clear_stats settings=switch/clearsettings.txt
+ /usr/bin/time -f "%e" ./$3 master $arg 2> ${LOGDIR}/tmp
+ perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl settings=switch/settings.txt
+ cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}.txt
+ if [ $i -eq 0 ];then echo "<h3> Benchmark=${3} Thread=${2} Extension=${EXTENSION}</h3><br>" > ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html ;fi
+ cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
+ echo "<a href=\"${3}_${2}Thrd_${EXTENSION}_${i}.html\">Network Stats</a><br>" >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html
+ mv ${TOPDIR}/html/dell.html ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}_${i}.html
+ echo "Terminating ... "
+ pwd
+ rm client_stats.log
+ HOSTNAME=`hostname`
+ for machine in `echo $MACHINES`
+ do
+ if [ "$machine" != "$HOSTNAME" ]; then
+ ssh ${machine} 'source ~/.tmpvars; binpid=`ps aux | grep $bin | grep -v grep | cut -f2`; kill -USR1 $binpid'
+ fi
+ done
+ sleep 2
+ i=`expr $i + 1`
+ done
+}
+
function oneremote {
i=0;
DIR=`pwd`
# done
i=0;
- DSTMDIR=${HOME}/research/Robust/src
+ DSTMDIR=${HOME}/research/Robust/src/Benchmarks/Prefetch/config
rm dstm.conf
ln -s ${DSTMDIR}/dstm_1.conf dstm.conf
cd $BMDIR
echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
- localrun 1
+# localrun 1
- echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
+# echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
# oneremote 1 1 $NONPREFETCH_NONCACHE
- echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
+# echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
# oneremote 1 1 $NONPREFETCH
- echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
+# echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
# oneremote 1 1 $PREFETCH
-for count in 2 4 6 8
+for count in 8
do
+#echo "------- Running $count threads $BMDIR non-prefetch + non-cache on $count machines -----"
+#run 1 $count $NONPREFETCH_NONCACHE
+#echo "------- Running $count threads $BMDIR non-prefetch on $count machines -----"
+#run 1 $count $NONPREFETCH
+#echo "------- Running $count threads $BMDIR normal prefetch on $count machines -----"
+#run 1 $count $PREFETCH
+#echo "------- Running $count threads $BMDIR manual prefetch on $count machines -----"
+#run 1 $count $MANUAL_PREFETCH
+
+###########
echo "------- Running $count threads $BMDIR non-prefetch + non-cache on $count machines -----"
-run 1 $count $NONPREFETCH_NONCACHE
+runallstats 1 $count $NONPREFETCH_NONCACHE
echo "------- Running $count threads $BMDIR non-prefetch on $count machines -----"
-run 1 $count $NONPREFETCH
-echo "------- Running $count threads $BMDIR prefetch on $count machines -----"
-run 1 $count $PREFETCH
+runallstats 1 $count $NONPREFETCH
+echo "------- Running $count threads $BMDIR normal prefetch on $count machines -----"
+runallstats 1 $count $PREFETCH
echo "------- Running $count threads $BMDIR manual prefetch on $count machines -----"
-#run 1 $count $MANUAL_PREFETCH
+runallstats 1 $count $MANUAL_PREFETCH
+#############
+
done
cd $TOPDIR