4 MACHINES2='dw-9.eecs.uci.edu'
5 MACHINES3='dw-9.eecs.uci.edu dw-7.eecs.uci.edu'
6 MACHINES4='dw-9.eecs.uci.edu dw-7.eecs.uci.edu dw-5.eecs.uci.edu'
7 LOGDIR=/home/adash/research/Robust/src/Benchmarks/Prefetch/runlog
13 while [ $i -lt $1 ]; do
14 echo "$DIR" > ~/.tmpdir
15 echo "bin=$3" > ~/.tmpvars
29 for machine in `echo $MACHINES`
31 ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' &
35 /usr/bin/time -f "%e" ./$3 master $arg 2>> ${LOGDIR}/${3}_${EXTENSION}.txt
36 echo "Terminating ... "
37 for machine in `echo $MACHINES`
39 ssh ${machine} 'source ~/.tmpvars; killall $bin'
49 while [ $i -lt $1 ]; do
50 echo "$DIR" > ~/.tmpdir
51 echo "bin=$3" > ~/.tmpvars
52 echo "arg='$ARGS1'" > ~/.tmpargs
53 echo "logd=$LOGDIR" > ~/.tmplogdir
54 echo "ext=$EXTENSION" > ~/.tmpext
56 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'
57 echo "Terminating ... "
66 #while [ $i -lt $1 ]; do
67 # /usr/bin/time -f "%e" ./${NONPREFETCH} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH}_local_${EXTENSION}.txt
72 while [ $i -lt $1 ]; do
73 /usr/bin/time -f "%e" ./${NONPREFETCH_NONCACHE} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH_NONCACHE}_local_${EXTENSION}.txt
80 PREFETCH=${BENCHMARK}1.bin
81 NONPREFETCH=${BENCHMARK}1NP.bin
82 NONPREFETCH_NONCACHE=${BENCHMARK}1NPNC.bin
83 PREFETCH2=${BENCHMARK}2.bin
84 NONPREFETCH2=${BENCHMARK}2NP.bin
85 NONPREFETCH_NONCACHE2=${BENCHMARK}2NPNC.bin
86 PREFETCH3=${BENCHMARK}3.bin
87 NONPREFETCH3=${BENCHMARK}3NP.bin
88 NONPREFETCH_NONCACHE3=${BENCHMARK}3NPNC.bin
89 PREFETCH4=${BENCHMARK}4.bin
90 NONPREFETCH4=${BENCHMARK}4NP.bin
91 NONPREFETCH_NONCACHE4=${BENCHMARK}4NPNC.bin
94 echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
97 echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
98 # oneremote 1 1 $NONPREFETCH_NONCACHE
99 echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
100 # oneremote 1 1 $NONPREFETCH
101 echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
102 # oneremote 1 1 $PREFETCH
104 echo "---------- Running two threads $BMDIR non-prefetch + non-cache on 2 machines ---------- "
105 run 3 2 $NONPREFETCH_NONCACHE2
106 echo "---------- Running two threads $BMDIR non-prefetch on 2 machines ---------- "
107 # run 3 2 $NONPREFETCH2
108 echo "---------- Running two threads $BMDIR prefetch on 2 machines ---------- "
111 echo "---------- Running three threads $BMDIR non-prefetch + non-cache on 3 machines ---------- "
112 run 3 3 $NONPREFETCH_NONCACHE3
113 echo "---------- Running three threads $BMDIR non-prefetch on 3 machines ---------- "
114 # run 3 3 $NONPREFETCH3
115 echo "---------- Running three threads $BMDIR prefetch on 3 machines ---------- "
118 echo "---------- Running four threads $BMDIR non-prefetch + non-cache on 4 machines ---------- "
119 run 3 4 $NONPREFETCH_NONCACHE4
120 echo "---------- Running four threads $BMDIR non-prefetch on 4 machines ---------- "
121 # run 3 4 $NONPREFETCH4
122 echo "---------- Running four threads $BMDIR prefetch on 4 machines ---------- "
128 function callmicrorun {
129 PREFETCH=${BENCHMARK}1.bin
130 NONPREFETCH=${BENCHMARK}1NP.bin
131 NONPREFETCH_NONCACHE=${BENCHMARK}1NPNC.bin
133 echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
135 echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
136 oneremote 10 1 $NONPREFETCH_NONCACHE
137 echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
138 oneremote 10 1 $NONPREFETCH
139 echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
140 oneremote 10 1 $PREFETCH
144 benchmarks='array chase mmver200 mmver600'
145 #benchmarks='em3dver10000100015'
146 #benchmarks='moldynverA'
147 #benchmarks='sorverD' //8000 X 8000 matrix
149 echo "---------- Clean old files ---------- "
151 for b in `echo $benchmarks`
154 BENCHMARK=`echo $bm | cut -f1 -d":"`
155 BMDIR=`echo $bm | cut -f2 -d":"`
156 ARGS1=`echo $bm | cut -f3 -d":"`
157 ARGS2=`echo $bm | cut -f4 -d":"`
158 ARGS3=`echo $bm | cut -f5 -d":"`
159 ARGS4=`echo $bm | cut -f6 -d":"`
160 EXTENSION=`echo $bm | cut -f7 -d":"`
163 if [ $b == $name1 ] || [ $b == $name2 ]; then
170 #----------Calulates the averages -----------
171 for file in `ls runlog/*.txt`
173 echo -n $file >> average.txt
174 cat $file | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
176 echo "===========" >> average.txt
177 echo "" >> average.txt