From 99f97443f55a42ad8c8468294e169b539ad89633 Mon Sep 17 00:00:00 2001 From: adash Date: Tue, 10 Mar 2009 17:52:05 +0000 Subject: [PATCH] added to script to generate the stats on remote machine and print to /tmp/client_stats.txt still has some problems but can generate necessary info for now --- Robust/src/Benchmarks/Prefetch/run.sh | 123 ++++++++++++++++++++++---- 1 file changed, 107 insertions(+), 16 deletions(-) diff --git a/Robust/src/Benchmarks/Prefetch/run.sh b/Robust/src/Benchmarks/Prefetch/run.sh index ff98817f..a7680d00 100755 --- a/Robust/src/Benchmarks/Prefetch/run.sh +++ b/Robust/src/Benchmarks/Prefetch/run.sh @@ -2,7 +2,8 @@ #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' @@ -28,7 +29,7 @@ function run { 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 @@ -67,11 +68,11 @@ function run { 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 "

Benchmark=${3} Thread=${2} Extension=${EXTENSION}


" > ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html ;fi cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html - echo "Network Stats
" >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html - mv ${TOPDIR}/html/dell.html ${LOGDIR}/${2}Thrd_${3}_${EXTENSION}_${i}.html + echo "Network Stats
" >> ${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 @@ -82,6 +83,84 @@ function run { 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 "

Benchmark=${3} Thread=${2} Extension=${EXTENSION}


" > ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html ;fi + cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html + echo "Network Stats
" >> ${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` @@ -109,7 +188,7 @@ function localrun { # 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 @@ -133,26 +212,38 @@ function callrun { 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 -- 2.34.1