Barrier barr;
int degree;
Random random;
- String hname;
barr = new Barrier("128.195.175.84");
atomic {
${MAINCLASS}Wrap.java \
BiGraph2.java \
Node2.java \
- EVector.java \
- BarrierNonDSM.java
+ EVector.java
default:
- ../../../../buildscript -optimize -mainclass ${MAINCLASS} ${SRC} -o ${MAINCLASS}
+ ../../../../buildscript -optimize -thread -mainclass ${MAINCLASS} ${SRC} -o ${MAINCLASS}
clean:
rm -rf tmpbuilddirectory
-public class Barrier {
+public class OldBarrier {
int numthreads;
int entercount;
boolean cleared;
- public Barrier(int n) {
+ public OldBarrier(int n) {
numthreads=n;
cleared = false;
entercount = 0;
}
- public Barrier() {
+ public OldBarrier() {
}
public void reset() {
entercount = 0;
}
- public static void enterBarrier(Barrier b) {
+ public static void enterBarrier(OldBarrier b) {
int tmp;
boolean retry=true, ret1=false, ret2=true;;
MAINCLASS=MatrixMultiply
-SRC=${MAINCLASS}.java
+SRC=${MAINCLASS}N.java
default:
javac ${SRC}
run:
MAINCLASS=MatrixMultiply
SRC1=${MAINCLASS}N.java
SRC2=${MAINCLASS}Nrun.java
-FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.90
+FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.98
FLAGS1=-dsm -optimize -dsmcaching -mainclass ${MAINCLASS}
FLAGS2=-dsm -optimize -mainclass ${MAINCLASS}
default:
128.195.175.86
128.195.175.87
128.195.175.88
+128.195.175.89
+128.195.175.90
+128.195.175.91
MACHINES3='dw-11.eecs.uci.edu dw-12.eecs.uci.edu'
MACHINES4='dw-11.eecs.uci.edu dw-12.eecs.uci.edu dw-13.eecs.uci.edu'
MACHINES5='dw-11.eecs.uci.edu dw-12.eecs.uci.edu dw-13.eecs.uci.edu dw-14.eecs.uci.edu'
+MACHINES6='dw-11.eecs.uci.edu dw-12.eecs.uci.edu dw-13.eecs.uci.edu dw-14.eecs.uci.edu dw-15.eecs.uci.edu'
+MACHINES7='dw-11.eecs.uci.edu dw-12.eecs.uci.edu dw-13.eecs.uci.edu dw-14.eecs.uci.edu dw-15.eecs.uci.edu dw-16.eecs.uci.edu'
+MACHINES8='dw-11.eecs.uci.edu dw-12.eecs.uci.edu dw-13.eecs.uci.edu dw-14.eecs.uci.edu dw-15.eecs.uci.edu dw-16.eecs.uci.edu dw-17.eecs.uci.edu'
LOGDIR=/home/adash/research/Robust/src/Benchmarks/Prefetch/runlog
TOPDIR=`pwd`
arg=$ARGS5
MACHINES=$MACHINES5
fi
+ if [ $2 -eq 6 ]; then
+ arg=$ARGS6
+ MACHINES=$MACHINES6
+ fi
+ if [ $2 -eq 7 ]; then
+ arg=$ARGS7
+ MACHINES=$MACHINES7
+ fi
+ if [ $2 -eq 8 ]; then
+ arg=$ARGS8
+ MACHINES=$MACHINES8
+ fi
chmod +x ~/.tmpvars
for machine in `echo $MACHINES`
do
ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' &
echo ""
done
- sleep 2
+ sleep 2
/usr/bin/time -f "%e" ./$3 master $arg 2>> ${LOGDIR}/${3}.txt
echo "Terminating ... "
for machine in `echo $MACHINES`
NONPREFETCH3=${BENCHMARK}3NP.bin
NONPREFETCH4=${BENCHMARK}4NP.bin
NONPREFETCH5=${BENCHMARK}5NP.bin
+ NONPREFETCH6=${BENCHMARK}6NP.bin
+ NONPREFETCH7=${BENCHMARK}7NP.bin
+ NONPREFETCH8=${BENCHMARK}8NP.bin
echo "---------- Running ${BENCHMARK} local non-prefetch on 1 machine ---------- "
- localrun 1
+ localrun 10
echo "---------- Running ${BENCHMARK} two threads non-prefetch on 2 machines ---------- "
- run 1 2 $NONPREFETCH2
+ run 10 2 $NONPREFETCH2
echo "---------- Running ${BENCHMARK} three threads non-prefetch on 3 machines ---------- "
- run 1 3 $NONPREFETCH3
+ run 10 3 $NONPREFETCH3
echo "---------- Running ${BENCHMARK} four threads non-prefetch on 4 machines ---------- "
- run 1 4 $NONPREFETCH4
+ run 5 4 $NONPREFETCH4
echo "---------- Running ${BENCHMARK} five threads non-prefetch on 5 machines ---------- "
- run 1 5 $NONPREFETCH5
+ run 10 5 $NONPREFETCH5
+ echo "---------- Running ${BENCHMARK} six threads non-prefetch on 6 machines ---------- "
+ run 10 6 $NONPREFETCH6
+ echo "---------- Running ${BENCHMARK} seven threads non-prefetch on 7 machines ---------- "
+ run 10 7 $NONPREFETCH7
+ echo "---------- Running ${BENCHMARK} eight threads non-prefetch on 8 machines ---------- "
+ run 10 8 $NONPREFETCH8
cd $TOPDIR
}
ARGS3=`echo $bm | cut -f4 -d":"`
ARGS4=`echo $bm | cut -f5 -d":"`
ARGS5=`echo $bm | cut -f6 -d":"`
- EXTENSION=`echo $bm | cut -f7 -d":"`
+ ARGS6=`echo $bm | cut -f7 -d":"`
+ ARGS7=`echo $bm | cut -f8 -d":"`
+ ARGS8=`echo $bm | cut -f9 -d":"`
+ EXTENSION=`echo $bm | cut -f10 -d":"`
callrun
done
for file in `ls ../runlog/*.txt`
do
echo -n $file >> average.txt
- cat $file | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
+ cat $file | grep -v "^Command" | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
done
echo "===========" >> average.txt
echo "" >> average.txt
JGFSORBenchSizeD:SOR/dsm:1:2:3:4:5:6:7:8:sorverD
JGFMolDynBenchSizeA:Moldyn/dsm:1:2:3:4:5:6:7:8:moldynverA
JGFMolDynBenchSizeD:Moldyn/dsm:1:2:3:4:5:6:7:8:moldynverD
-JGFLUFactBenchSizeA:LUFact/dsm:1:2:3:4:lufactverA
-MatrixMultiply:MM200:1 200 30:2 200 30:3 200 30:4 200 30:5 200 30:6 200 30:7 200 30:8 200 30:mmver200
-MatrixMultiply:MatrixMultiply:1 600:2 600:3 600:4 600:5 600:6 600:7 600:8 600:mmver600
+JGFLUFactBenchSizeA:LUFact/dsm:1:2:3:4:5:6:7:8:lufactverA
+MatrixMultiply:MM200:1 200 30:2 200 30:3 200 30:4 200 30:5 200 30:6 200 30:7 200 30:8 200 30:200mmver
+MatrixMultiply:MatrixMultiply:1 800:2 800:3 800:4 800:5 800:6 800:7 800:8 800:800mmver
+MatrixMultiply:MatrixMultiply:1 600:2 600:3 600:4 600:5 600:6 600:7 600:8 600:600mmver
Em3d:Em3d/dsm:-T 1 -N 4000 -d 130 -p -i 6:-T 2 -N 4000 -d 130 -p -i 6:-T 3 -N 4000 -d 130 -p -i 6:-T 4 -N 4000 -d 130 -p -i 6:-T 5 -N 4000 -d 130 -p -i 6:-T 6 -N 4000 -d 130 -p -i 6:-T 7 -N 4000 -d 130 -p -i 6:-T 8 -N 4000 -d 130 -p -i 6:em3dver40001306
Em3d:Em3d/dsm:-T 1 -N 6000 -d 200 -p -i 10:-T 2 -N 6000 -d 200 -p -i 10:-T 3 -N 6000 -d 200 -p -i 10:-T 4 -N 6000 -d 200 -p -i 10:-T 5 -N 6000 -d 200 -p -i 10:-T 6 -N 6000 -d 200 -p -i 10:-T 7 -N 6000 -d 200 -p -i 10:-T 8 -N 6000 -d 200 -p -i 10:em3dver600020010
Em3d:Em3d/dsm:-T 1 -N 10000 -d 1000 -i 15:-T 2 -N 10000 -d 1000 -i 15:-T 3 -N 10000 -d 1000 -i 15:-T 4 -N 10000 -d 1000 -i 15:-T 5 -N 10000 -d 1000 -i 15:-T 6 -N 10000 -d 1000 -i 15:-T 7 -N 10000 -d 1000 -i 15:-T 8 -N 10000 -d 1000 -i 15:em3dver10000100015
Chase:Chase:::::chase
Array:Array:::::array
+fft2d:2DFFT/dsm:1 1600:2 1600:3 1600:4 1600:5 1600:6 1600:7 1600:8 1600:1600fft2d
+fft2d:2DFFT/dsm:1 1152:2 1152:3 1152:4 1152:5 1152:6 1152:7 1152:8 1152:1152fft2d
+fft2d:2DFFT/dsm:1 3200:2 3200:3 3200:4 3200:5 3200:6 3200:7 3200:8 3200:3200fft2d
+Heat:HeatFlow/dsm:1 200:2 200:3 200:4 200:5 200:6 200:7 200:8 200:heatflow
+Convolution:2DConv/dsm:1 4096:2 4096:3 4096:4 4096:5 4096:6 4096:7 4096:8 4096:40962dconv
+Convolution:2DConv/dsm:1 8192:2 8192:3 8192:4 8192:5 8192:6 8192:7 8192:8 8192:81922dconv
+Convolution:2DConv/dsm:1 16000:2 16000:3 16000:4 16000:5 16000:6 16000:7 16000:8 16000:160002dconv
+Convolution:2DConv/dsm:1 2048:2 2048:3 2048:4 2048:5 2048:6 2048:7 2048:8 2048:20482dconv
+Convolution:2DConv/dsm:1 1024:2 1024:3 1024:4 1024:5 1024:6 1024:7 1024:8 1024:10242dconv
+Convolution:2DConv/dsm:1 6000:2 6000:3 6000:4 6000:5 6000:6 6000:7 6000:8 6000:60002dconv
cd $BMDIR
echo "---------- Running local $BMDIR non-prefetch on 1 machine ---------- "
- # localrun 1
+ localrun 10
echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
# oneremote 1 1 $NONPREFETCH_NONCACHE
# oneremote 1 1 $PREFETCH
echo "---------- Running two threads $BMDIR non-prefetch + non-cache on 2 machines ---------- "
- run 1 2 $NONPREFETCH_NONCACHE2
+ run 10 2 $NONPREFETCH_NONCACHE2
echo "---------- Running two threads $BMDIR non-prefetch on 2 machines ---------- "
- run 1 2 $NONPREFETCH2
+# run 1 2 $NONPREFETCH2
echo "---------- Running two threads $BMDIR prefetch on 2 machines ---------- "
- run 1 2 $PREFETCH2
+ run 10 2 $PREFETCH2
echo "---------- Running three threads $BMDIR non-prefetch + non-cache on 3 machines ---------- "
- run 1 3 $NONPREFETCH_NONCACHE3
+# run 10 3 $NONPREFETCH_NONCACHE3
echo "---------- Running three threads $BMDIR non-prefetch on 3 machines ---------- "
- run 1 3 $NONPREFETCH3
+# run 1 3 $NONPREFETCH3
echo "---------- Running three threads $BMDIR prefetch on 3 machines ---------- "
- run 1 3 $PREFETCH3
+# run 10 3 $PREFETCH3
echo "---------- Running four threads $BMDIR non-prefetch + non-cache on 4 machines ---------- "
- run 1 4 $NONPREFETCH_NONCACHE4
+ run 10 4 $NONPREFETCH_NONCACHE4
echo "---------- Running four threads $BMDIR non-prefetch on 4 machines ---------- "
- run 1 4 $NONPREFETCH4
+# run 1 4 $NONPREFETCH4
echo "---------- Running four threads $BMDIR prefetch on 4 machines ---------- "
- run 1 4 $PREFETCH4
+ run 10 4 $PREFETCH4
echo "---------- Running five threads $BMDIR non-prefetch + non-cache on 5 machines ---------- "
- run 1 5 $NONPREFETCH_NONCACHE5
+# run 1 5 $NONPREFETCH_NONCACHE5
echo "---------- Running five threads $BMDIR non-prefetch on 5 machines ---------- "
- run 1 5 $NONPREFETCH5
+# run 1 5 $NONPREFETCH5
echo "---------- Running five threads $BMDIR prefetch on 5 machines ---------- "
- run 1 5 $PREFETCH5
+# run 1 5 $PREFETCH5
echo "---------- Running six threads $BMDIR non-prefetch + non-cache on 6 machines ---------- "
- run 1 6 $NONPREFETCH_NONCACHE6
+# run 1 6 $NONPREFETCH_NONCACHE6
echo "---------- Running six threads $BMDIR non-prefetch on 6 machines ---------- "
- run 1 6 $NONPREFETCH6
+# run 1 6 $NONPREFETCH6
echo "---------- Running six threads $BMDIR prefetch on 6 machines ---------- "
- run 1 6 $PREFETCH6
+# run 1 6 $PREFETCH6
echo "---------- Running seven threads $BMDIR non-prefetch + non-cache on 7 machines ---------- "
- run 1 7 $NONPREFETCH_NONCACHE7
+# run 1 7 $NONPREFETCH_NONCACHE7
echo "---------- Running seven threads $BMDIR non-prefetch on 7 machines ---------- "
- run 1 7 $NONPREFETCH7
+# run 1 7 $NONPREFETCH7
echo "---------- Running seven threads $BMDIR prefetch on 7 machines ---------- "
- run 1 7 $PREFETCH7
+# run 1 7 $PREFETCH7
echo "---------- Running eight threads $BMDIR non-prefetch + non-cache on 8 machines ---------- "
- run 1 8 $NONPREFETCH_NONCACHE8
+ run 10 8 $NONPREFETCH_NONCACHE8
echo "---------- Running eight threads $BMDIR non-prefetch on 8 machines ---------- "
- run 1 8 $NONPREFETCH8
+# run 1 8 $NONPREFETCH8
echo "---------- Running eight threads $BMDIR prefetch on 8 machines ---------- "
- run 1 8 $PREFETCH8
+ run 10 8 $PREFETCH8
cd $TOPDIR
}
cd $TOPDIR
}
-benchmarks='mmver600 mmver200 moldynverA sorverD em3dver10000100015'
+#benchmarks='em3dver10000100015'
+#benchmarks='sorverD'
+#benchmarks='10242dconv'
+benchmarks='1152fft2d 1600fft2d 40962dconv 20482dconv mmver600 moldynverA'
echo "---------- Clean old files ---------- "
-rm runlog/*
+#rm runlog/*
for b in `echo $benchmarks`
do
bm=`grep $b bm.txt`
for file in `ls runlog/*.txt`
do
echo -n $file >> average.txt
- cat $file | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
+ cat $file | grep -v "^Command" | awk '{sum += $1} END {print " "sum/NR}' >> average.txt
done
echo "===========" >> average.txt
echo "" >> average.txt
outmethod.println("printf(\"nprehashSearch= %d\\n\", nprehashSearch);");
outmethod.println("printf(\"nRemoteReadSend= %d\\n\", nRemoteSend);");
outmethod.println("printf(\"nSoftAbort= %d\\n\", nSoftAbort);");
+ outmethod.println("printf(\"bytesSent= %d\\n\", bytesSent);");
+ outmethod.println("printf(\"bytesRecv= %d\\n\", bytesRecv);");
outmethod.println("#endif\n");
outmethod.println("}");
outclassdefs.print("extern int nprehashSearch;\n");
outclassdefs.print("extern int nRemoteSend;\n");
outclassdefs.print("extern int nSoftAbort;\n");
+ outclassdefs.print("extern int bytesSent;\n");
+ outclassdefs.print("extern int bytesRecv;\n");
outclassdefs.print("extern void handle();\n");
outclassdefs.print("#endif\n");
outclassdefs.print("int numprefetchsites = " + pa.prefetchsiteid + ";\n");
}
index=(key &table->mask)>>1;
while(1) {
- node = & table->table[index];
+ node = & table->table[index];
if (node->ptr==NULL) {
node->ptr=val;
node->key=key;
struct chashentry *node;
unsigned int ckey;
while(1) {
- node = & table->table[tmp];
+ node = & table->table[tmp];
ckey=node->key;
if (ckey==key)
return node->ptr;
if (bin==newsize)
bin=0;
}
-
+
}
}
free(ptr); //Free the memory of the old hash table
extern int nprehashSearch;
extern int nRemoteSend;
extern int nSoftAbort;
+extern int bytesSent;
+extern int bytesRecv;
extern unsigned int myIpAddr;
void handle();
printf("nprehashSearch = %d\n", nprehashSearch);
printf("nRemoteReadSend = %d\n", nRemoteSend);
printf("nSoftAbort = %d\n", nSoftAbort);
+ printf("bytesSent = %d\n", bytesSent);
+ printf("bytesRecv = %d\n", bytesRecv);
exit(0);
#endif
}
int nprehashSearch = 0;
int nRemoteSend = 0;
int nSoftAbort = 0;
+int bytesSent = 0;
+int bytesRecv = 0;
void printhex(unsigned char *, int);
plistnode_t *createPiles(transrecord_t *);
int numbytes;
while (size > 0) {
numbytes = send(fd, buffer, size, MSG_NOSIGNAL);
+ bytesSent = bytesSent + numbytes;
if (numbytes == -1) {
perror("send");
exit(0);
int numbytes;
while (size > 0) {
numbytes = recv(fd, buffer, size, 0);
+ bytesRecv = bytesRecv + numbytes;
if (numbytes == -1) {
perror("recv");
exit(0);
RAWPATHFLAG=true
elif [[ $1 = '-runtimedebug' ]]
then
-EXTRAOPTIONS="$EXTRAOPTIONS -DCHECKTA"
+EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
elif [[ $1 = '-dsmcaching' ]]
then
EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"