From fed3ebc939f4ca24e4b1946c1542a0a33e9c2942 Mon Sep 17 00:00:00 2001 From: adash Date: Wed, 7 May 2008 17:54:35 +0000 Subject: [PATCH] modified run script and txt file that is input for the script --- Robust/src/Benchmarks/Prefetch/bm.txt | 13 +++-- Robust/src/Benchmarks/Prefetch/run.sh | 78 +++++++++++++++++++-------- 2 files changed, 64 insertions(+), 27 deletions(-) diff --git a/Robust/src/Benchmarks/Prefetch/bm.txt b/Robust/src/Benchmarks/Prefetch/bm.txt index b9b6d19a..7a2ab7ac 100644 --- a/Robust/src/Benchmarks/Prefetch/bm.txt +++ b/Robust/src/Benchmarks/Prefetch/bm.txt @@ -1,5 +1,8 @@ -JGFSORBenchSizeA:SOR/dsm::2:4:sorverA -MatrixMultiply:MatrixMultiply:1 200 30:2 200 30:4 200 30:mmver200 -MatrixMultiply:MatrixMultiply:1 150 30:2 150 30:4 150 30:mmver150 -Em3d:Em3d/dsm:-T 1 -N 4000 -d 200 -p -i 1:-T 2 -N 4000 -d 200 -p -i 1:-T 4 -N 4000 -d 200 -p -i 1:em3dver4000 -Em3d:Em3d/dsm:-T 1 -N 3000 -d 200 -p -i 1:-T 2 -N 3000 -d 200 -p -i 1:-T 4 -N 3000 -d 200 -p -i 1:em3dver3000 +JGFSORBenchSizeA:SOR/dsm::2:3:4:sorverA +JGFLUFactBenchSizeA:LUFact/dsm::2:4:lufactverA +JGFLUFactBenchSizeB:LUFact/dsm::2:4:lufactverB +MatrixMultiply:MatrixMultiply:1 200 30:2 200 30:3 200 30:4 200 30:mmver200 +MatrixMultiply:MatrixMultiply:1 600:2 600:3 600:4 600:mmver600 +Em3d:Em3d/dsm:-T 1 -N 4000 -d 130 -p -i 3:-T 2 -N 4000 -d 130 -p -i 3:-T 3 -N 4000 -d 130 -p -i 3:-T 4 -N 4000 -d 130 -p -i 3:em3dver40001303 +Chase:Chase:::::chase +Array:Array:::::array diff --git a/Robust/src/Benchmarks/Prefetch/run.sh b/Robust/src/Benchmarks/Prefetch/run.sh index 0c79f43d..c5ad2110 100755 --- a/Robust/src/Benchmarks/Prefetch/run.sh +++ b/Robust/src/Benchmarks/Prefetch/run.sh @@ -1,8 +1,8 @@ #!/bin/sh MACHINES2='dw-9.eecs.uci.edu' +MACHINES3='dw-9.eecs.uci.edu dw-5.eecs.uci.edu' MACHINES4='dw-9.eecs.uci.edu dw-5.eecs.uci.edu dw-7.eecs.uci.edu' -#MACHINES4='dw-9.eecs.uci.edu dw-1.eecs.uci.edu dw-2.eecs.uci.edu' LOGDIR=/home/adash/research/Robust/src/Benchmarks/Prefetch/runlog TOPDIR=`pwd` @@ -12,14 +12,14 @@ function run { while [ $i -lt $1 ]; do echo "$DIR" > ~/.tmpdir echo "bin=$3" > ~/.tmpvars - if [ $2 -eq 1 ]; then - arg=$ARGS1 - MACHINES=$MACHINES2 - fi if [ $2 -eq 2 ]; then arg=$ARGS2 MACHINES=$MACHINES2 fi + if [ $2 -eq 3 ]; then + arg=$ARGS3 + MACHINES=$MACHINES3 + fi if [ $2 -eq 4 ]; then arg=$ARGS4 MACHINES=$MACHINES4 @@ -30,13 +30,14 @@ function run { ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' & echo "" done - sleep 4 + sleep 5 /usr/bin/time -f "%e" ./$3 master $arg 2>> ${LOGDIR}/${3}_${EXTENSION}.txt echo "Terminating ... " for machine in `echo $MACHINES` do ssh ${machine} 'source ~/.tmpvars; killall $bin' done + sleep 2 i=`expr $i + 1` done } @@ -54,6 +55,7 @@ function oneremote { 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' echo "Terminating ... " killall $3 + sleep 2 i=`expr $i + 1` done } @@ -61,12 +63,8 @@ function oneremote { function localrun { i=0; while [ $i -lt $1 ]; do - #echo $ARGS1 /usr/bin/time -f "%e" ./${NONPREFETCH} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH}_local_${EXTENSION}.txt - sleep 1 - #avg=`cat ${LOGDIR}/${NONPREFETCH}.txt | awk '{sum+=$1} END {print sum/NR}'` - #sort -nr ${LOGDIR}/${NONPREFETCH}.txt | tail -1 - #sort -nr ${LOGDIR}/${NONPREFETCH}.txt | tail -1 + sleep 4 i=`expr $i + 1` done } @@ -76,32 +74,53 @@ function callrun { NONPREFETCH=${BENCHMARK}1NP.bin PREFETCH2=${BENCHMARK}2.bin NONPREFETCH2=${BENCHMARK}2NP.bin + PREFETCH3=${BENCHMARK}3.bin + NONPREFETCH3=${BENCHMARK}3NP.bin PREFETCH4=${BENCHMARK}4.bin NONPREFETCH4=${BENCHMARK}4NP.bin cd $BMDIR - echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- " - localrun 1 +#localrun 10 echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- " - oneremote 1 1 $NONPREFETCH +# oneremote 10 1 $NONPREFETCH echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- " - oneremote 1 1 $PREFETCH +# oneremote 10 1 $PREFETCH echo "---------- Running two threads $BMDIR non-prefetch on 2 machines ---------- " - run 1 2 $NONPREFETCH2 +# run 10 2 $NONPREFETCH2 echo "---------- Running two threads $BMDIR prefetch on 2 machines ---------- " - run 1 2 $PREFETCH2 + run 4 2 $PREFETCH2 + + echo "---------- Running three threads $BMDIR non-prefetch on 3 machines ---------- " +# run 10 3 $NONPREFETCH3 + echo "---------- Running three threads $BMDIR prefetch on 3 machines ---------- " +# run 10 3 $PREFETCH3 echo "---------- Running four threads $BMDIR non-prefetch on 4 machines ---------- " - run 1 4 $NONPREFETCH4 +# run 10 4 $NONPREFETCH4 echo "---------- Running four threads $BMDIR prefetch on 4 machines ---------- " - run 1 4 $PREFETCH4 +# run 10 4 $PREFETCH4 + + cd $TOPDIR +} + +function callmicrorun { + PREFETCH=${BENCHMARK}1.bin + NONPREFETCH=${BENCHMARK}1NP.bin + cd $BMDIR + echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- " + localrun 10 + echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- " + oneremote 10 1 $NONPREFETCH + echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- " + oneremote 10 1 $PREFETCH cd $TOPDIR } -benchmarks='sorverA em3dver4000 em3dver3000 mmver150 mmver200' +benchmarks='array' +#benchmarks='array chase mmver200 mmver600 em3dver40001303 sorverA' echo "---------- Clean old files ---------- " rm runlog/* @@ -112,9 +131,24 @@ do BMDIR=`echo $bm | cut -f2 -d":"` ARGS1=`echo $bm | cut -f3 -d":"` ARGS2=`echo $bm | cut -f4 -d":"` - ARGS4=`echo $bm | cut -f5 -d":"` - EXTENSION=`echo $bm | cut -f6 -d":"` + ARGS3=`echo $bm | cut -f5 -d":"` + ARGS4=`echo $bm | cut -f6 -d":"` + EXTENSION=`echo $bm | cut -f7 -d":"` + name1='array' + name2='chase' + if [ $b == $name1 ] || [ $b == $name2 ]; then + callmicrorun + else callrun + fi +done + +for file in `ls runlog/*.txt` +do + echo -n $file >> average.txt + cat $file | awk '{sum += $1} END {print " "sum/NR}' >> average.txt done +echo "===========" >> average.txt +echo "" >> average.txt echo "done" -- 2.34.1