3 MACHINES2='dw-9.eecs.uci.edu'
4 MACHINES3='dw-9.eecs.uci.edu dw-5.eecs.uci.edu'
5 MACHINES4='dw-9.eecs.uci.edu dw-5.eecs.uci.edu dw-7.eecs.uci.edu'
6 LOGDIR=/home/adash/research/Robust/src/Benchmarks/Prefetch/runlog
12 while [ $i -lt $1 ]; do
13 echo "$DIR" > ~/.tmpdir
14 echo "bin=$3" > ~/.tmpvars
28 for machine in `echo $MACHINES`
30 ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' &
34 /usr/bin/time -f "%e" ./$3 master $arg 2>> ${LOGDIR}/${3}_${EXTENSION}.txt
35 echo "Terminating ... "
36 for machine in `echo $MACHINES`
38 ssh ${machine} 'source ~/.tmpvars; killall $bin'
48 while [ $i -lt $1 ]; do
49 echo "$DIR" > ~/.tmpdir
50 echo "bin=$3" > ~/.tmpvars
51 echo "arg='$ARGS1'" > ~/.tmpargs
52 echo "logd=$LOGDIR" > ~/.tmplogdir
53 echo "ext=$EXTENSION" > ~/.tmpext
55 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'
56 echo "Terminating ... "
65 while [ $i -lt $1 ]; do
66 /usr/bin/time -f "%e" ./${NONPREFETCH} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH}_local_${EXTENSION}.txt
73 PREFETCH=${BENCHMARK}1.bin
74 NONPREFETCH=${BENCHMARK}1NP.bin
75 PREFETCH2=${BENCHMARK}2.bin
76 NONPREFETCH2=${BENCHMARK}2NP.bin
77 PREFETCH3=${BENCHMARK}3.bin
78 NONPREFETCH3=${BENCHMARK}3NP.bin
79 PREFETCH4=${BENCHMARK}4.bin
80 NONPREFETCH4=${BENCHMARK}4NP.bin
83 echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
86 echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
87 oneremote 10 1 $NONPREFETCH
88 echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
89 oneremote 10 1 $PREFETCH
91 echo "---------- Running two threads $BMDIR non-prefetch on 2 machines ---------- "
92 run 10 2 $NONPREFETCH2
93 echo "---------- Running two threads $BMDIR prefetch on 2 machines ---------- "
96 echo "---------- Running three threads $BMDIR non-prefetch on 3 machines ---------- "
97 run 10 3 $NONPREFETCH3
98 echo "---------- Running three threads $BMDIR prefetch on 3 machines ---------- "
101 echo "---------- Running four threads $BMDIR non-prefetch on 4 machines ---------- "
102 run 10 4 $NONPREFETCH4
103 echo "---------- Running four threads $BMDIR prefetch on 4 machines ---------- "
109 function callmicrorun {
110 PREFETCH=${BENCHMARK}1.bin
111 NONPREFETCH=${BENCHMARK}1NP.bin
113 echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
115 echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
116 oneremote 10 1 $NONPREFETCH
117 echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
118 oneremote 10 1 $PREFETCH
122 benchmarks='array chase mmver200 mmver600 em3dver40001303 sorverA'
124 echo "---------- Clean old files ---------- "
126 for b in `echo $benchmarks`
129 BENCHMARK=`echo $bm | cut -f1 -d":"`
130 BMDIR=`echo $bm | cut -f2 -d":"`
131 ARGS1=`echo $bm | cut -f3 -d":"`
132 ARGS2=`echo $bm | cut -f4 -d":"`
133 ARGS3=`echo $bm | cut -f5 -d":"`
134 ARGS4=`echo $bm | cut -f6 -d":"`
135 EXTENSION=`echo $bm | cut -f7 -d":"`
138 if [ $b == $name1 ] || [ $b == $name2 ]; then
145 #----------Calulates the averages -----------
146 for file in `ls runlog/*.txt`
148 echo -n $file >> average.txt
149 cat $file | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
151 echo "===========" >> average.txt
152 echo "" >> average.txt