From 21e192107d6d70b8af180698d40d1f0ae3a203af Mon Sep 17 00:00:00 2001 From: adash Date: Mon, 5 May 2008 21:26:43 +0000 Subject: [PATCH] modifications to run same benchmarks with different arguments (treated as a separate benchmark from the bm.txt file ) --- Robust/src/Benchmarks/Prefetch/bm.txt | 8 +++-- Robust/src/Benchmarks/Prefetch/run.sh | 49 +++++++++++++++++++-------- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/Robust/src/Benchmarks/Prefetch/bm.txt b/Robust/src/Benchmarks/Prefetch/bm.txt index 51b69032..b9b6d19a 100644 --- a/Robust/src/Benchmarks/Prefetch/bm.txt +++ b/Robust/src/Benchmarks/Prefetch/bm.txt @@ -1,3 +1,5 @@ -JGFSORBenchSizeA:SOR/dsm::2:4 -MatrixMultiply:MatrixMultiply:1 600:2 600:4 600 -Em3d:Em3d/dsm:-T 1 -N 4000 -d 200 -p -i 4:-T 2 -N 4000 -d 200 -p -i 4:-T 4 -N 4000 -d 200 -p -i 4 +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 diff --git a/Robust/src/Benchmarks/Prefetch/run.sh b/Robust/src/Benchmarks/Prefetch/run.sh index efccc332..0c79f43d 100755 --- a/Robust/src/Benchmarks/Prefetch/run.sh +++ b/Robust/src/Benchmarks/Prefetch/run.sh @@ -1,7 +1,8 @@ #!/bin/sh -MACHINES2='dw-8.eecs.uci.edu' -MACHINES4='dw-8.eecs.uci.edu dw-5.eecs.uci.edu dw-7.eecs.uci.edu' +MACHINES2='dw-9.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` @@ -29,8 +30,8 @@ function run { ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' & echo "" done - sleep 1 - /usr/bin/time -f "%e" ./$3 master $arg 2>> ${LOGDIR}/${3}.txt + sleep 4 + /usr/bin/time -f "%e" ./$3 master $arg 2>> ${LOGDIR}/${3}_${EXTENSION}.txt echo "Terminating ... " for machine in `echo $MACHINES` do @@ -40,11 +41,28 @@ function run { done } +function oneremote { + i=0; + DIR=`pwd` + while [ $i -lt $1 ]; do + echo "$DIR" > ~/.tmpdir + echo "bin=$3" > ~/.tmpvars + echo "arg='$ARGS1'" > ~/.tmpargs + echo "logd=$LOGDIR" > ~/.tmplogdir + echo "ext=$EXTENSION" > ~/.tmpext + ./$3 & + 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 + i=`expr $i + 1` + done +} + function localrun { i=0; while [ $i -lt $1 ]; do #echo $ARGS1 - /usr/bin/time -f "%e" ./${NONPREFETCH} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH}.txt + /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 @@ -63,27 +81,27 @@ function callrun { cd $BMDIR - echo "---------- Running local $BMDIR non-prefetch ---------- " + echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- " localrun 1 - echo "---------- Running remote $BMDIR non-prefetch 1 thread 2 machines ---------- " - run 1 1 $NONPREFETCH - echo "---------- Running remote $BMDIR prefetch 1 thread 2 machines ---------- " - run 1 1 $PREFETCH + 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 ---------- " + oneremote 1 1 $PREFETCH - echo "---------- Running remote $BMDIR non-prefetch 2 machines ---------- " + echo "---------- Running two threads $BMDIR non-prefetch on 2 machines ---------- " run 1 2 $NONPREFETCH2 - echo "---------- Running remote $BMDIR prefetch 2 machines ---------- " + echo "---------- Running two threads $BMDIR prefetch on 2 machines ---------- " run 1 2 $PREFETCH2 - echo "---------- Running remote $BMDIR non-prefetch 4 machines ---------- " + echo "---------- Running four threads $BMDIR non-prefetch on 4 machines ---------- " run 1 4 $NONPREFETCH4 - echo "---------- Running remote $BMDIR prefetch 4 machines ---------- " + echo "---------- Running four threads $BMDIR prefetch on 4 machines ---------- " run 1 4 $PREFETCH4 cd $TOPDIR } -benchmarks='MatrixMultiply JGFSORBenchSizeA Em3d' +benchmarks='sorverA em3dver4000 em3dver3000 mmver150 mmver200' echo "---------- Clean old files ---------- " rm runlog/* @@ -95,6 +113,7 @@ do ARGS1=`echo $bm | cut -f3 -d":"` ARGS2=`echo $bm | cut -f4 -d":"` ARGS4=`echo $bm | cut -f5 -d":"` + EXTENSION=`echo $bm | cut -f6 -d":"` callrun done -- 2.34.1