From 61abfb7e9d160b381f2e39a4da1e703da3de3322 Mon Sep 17 00:00:00 2001 From: jihoonl Date: Fri, 8 Jan 2010 00:47:26 +0000 Subject: [PATCH] changes --- .../MatrixMultiply/MatrixMultiplyN.java | 4 +- .../Recovery/MatrixMultiply/makefile | 2 +- .../Benchmarks/Recovery/Spider/Spider.java | 14 ++- .../src/Benchmarks/Recovery/Spider/dstm.conf | 12 +-- .../src/Benchmarks/Recovery/Spider/makefile | 2 +- Robust/src/Benchmarks/Recovery/runjava.sh | 90 +++++++++++++++++++ 6 files changed, 110 insertions(+), 14 deletions(-) create mode 100755 Robust/src/Benchmarks/Recovery/runjava.sh diff --git a/Robust/src/Benchmarks/Recovery/MatrixMultiply/MatrixMultiplyN.java b/Robust/src/Benchmarks/Recovery/MatrixMultiply/MatrixMultiplyN.java index f4b8d871..fdc24eba 100644 --- a/Robust/src/Benchmarks/Recovery/MatrixMultiply/MatrixMultiplyN.java +++ b/Robust/src/Benchmarks/Recovery/MatrixMultiply/MatrixMultiplyN.java @@ -61,10 +61,10 @@ public class MatrixMultiply extends Task { } lc = new double[size][size]; - System.out.println("Seg x0 = " + x0 + " - x1 = " + x1); +// System.out.println("Seg x0 = " + x0 + " - x1 = " + x1); for(i = x0; i < x1 ; i++) { - System.printString("i = " + i + "\n"); +// System.printString("i = " + i + "\n"); atomic { rowA = la[i]; // grab first mat's row diff --git a/Robust/src/Benchmarks/Recovery/MatrixMultiply/makefile b/Robust/src/Benchmarks/Recovery/MatrixMultiply/makefile index b78e006c..cb8d03bd 100644 --- a/Robust/src/Benchmarks/Recovery/MatrixMultiply/makefile +++ b/Robust/src/Benchmarks/Recovery/MatrixMultiply/makefile @@ -1,7 +1,7 @@ MAINCLASS=MatrixMultiply SRC1=${MAINCLASS}N.java -FLAGS= -recovery -dsm -32bit -nooptimize -recovery -debug -dsmtask -mainclass ${MAINCLASS} +FLAGS= -recovery -recoverystats -dsm -32bit -nooptimize -debug -dsmtask -mainclass ${MAINCLASS} default: ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC1} diff --git a/Robust/src/Benchmarks/Recovery/Spider/Spider.java b/Robust/src/Benchmarks/Recovery/Spider/Spider.java index 27a7827f..dd286566 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/Spider.java +++ b/Robust/src/Benchmarks/Recovery/Spider/Spider.java @@ -2,7 +2,7 @@ public class Spider { public static void main(String[] args) { int NUM_THREADS = 3; int maxDepth = 4; - int maxSearchDepth = 10; + int maxSearchDepth = 100; int i, j; Work[] works; QueryTask[] qt; @@ -13,11 +13,17 @@ public class Spider { GlobalString firstmachine; GlobalString firstpage; - int mid[] = new int[NUM_THREADS]; - mid[0] = (128<<24)|(195<<16)|(180<<8)|21; + int mid[] = new int[8]; + mid[0] = (128<<24)|(195<<16)|(136<<8)|162; + mid[1] = (128<<24)|(195<<16)|(136<<8)|163; + mid[2] = (128<<24)|(195<<16)|(136<<8)|164; + mid[3] = (128<<24)|(195<<16)|(136<<8)|165; + + +/* mid[0] = (128<<24)|(195<<16)|(180<<8)|21; mid[1] = (128<<24)|(195<<16)|(180<<8)|24; mid[2] = (128<<24)|(195<<16)|(180<<8)|26; - +*/ atomic { firstmachine = global new GlobalString(args[1]); if (args.length == 3) { diff --git a/Robust/src/Benchmarks/Recovery/Spider/dstm.conf b/Robust/src/Benchmarks/Recovery/Spider/dstm.conf index da5d354d..eff447b8 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/dstm.conf +++ b/Robust/src/Benchmarks/Recovery/Spider/dstm.conf @@ -1,6 +1,6 @@ -128.195.180.21 -128.195.180.24 -128.195.180.26 -#128.195.136.162 -#128.195.136.163 -#128.195.136.164 +#128.195.180.21 +#128.195.180.24 +#128.195.180.26 +128.195.136.162 +128.195.136.163 +128.195.136.164 diff --git a/Robust/src/Benchmarks/Recovery/Spider/makefile b/Robust/src/Benchmarks/Recovery/Spider/makefile index eafdf663..8077da54 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/makefile +++ b/Robust/src/Benchmarks/Recovery/Spider/makefile @@ -3,7 +3,7 @@ SUBCLASS=Query SRC1=${MAINCLASS}.java SRC2=Global${SUBCLASS}.java SRC3=${SUBCLASS}Task.java -FLAGS= -recovery -dsmtask -dsm -dsmtask -32bit -nooptimize -debug -mainclass ${MAINCLASS} +FLAGS= -recovery -dsmtask -dsm -32bit -nooptimize -debug -mainclass ${MAINCLASS} default: ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC2} ${SRC3} ${SRC1} diff --git a/Robust/src/Benchmarks/Recovery/runjava.sh b/Robust/src/Benchmarks/Recovery/runjava.sh new file mode 100755 index 00000000..4d197ccf --- /dev/null +++ b/Robust/src/Benchmarks/Recovery/runjava.sh @@ -0,0 +1,90 @@ +# !/bin/sh +BASEDIR=`pwd` +LOGDIR=${BASEDIR} +DSTM_CONFDIR=${HOME}/research/Robust/src +JAVA_DIR=java +JVM_DIR=jvm +DSM_DIR=dsm +ITERATIONS=1 + +function killclients { + i=1; + let "k= $NUM_MACHINE"; + while [ $i -le $k ]; do + echo "killing dc-$i" + ssh dc-${i} pkill -u jihoonl -f MatrixMultiply.bin + i=`expr $i + 1` + done +} + +function runjava { +# Run java version + echo "Runnning ${BM_NAME}" + j=1; + BM_DIR=${BM_NAME} + + cd ${BM_DIR} + + while [ $j -le $ITERATIONS ]; do + echo "Running on ${NUM_MACHINE} machines ... " + + # Start machines + echo "Running machines" + let "k= $NUM_MACHINE" + + echo ${BASEDIR}/${BM_DIR} > ~/.tmpdir + DIR=`echo ${BASEDIR}\/${BM_DIR}`; + echo "DIR = $DIR"; + + while [ $k -gt 1 ]; do + echo "SSH into dc-${k}" + echo "ssh dc-${k} 'cd' $DIR'; ./$BM_NAME.bin'" + ssh dc-${k} 'cd '$DIR'; ./'$BM_NAME'.bin' & + k=`expr $k - 1` + done + echo "Running master machine ... " + echo "ssh dc-1 'cd '$DIR'; ./$BM_NAME.bin master $NUM_MACHINE $BM_ARGS" + ssh dc-1 'cd '$DIR'; ./'$BM_NAME'.bin master '$NUM_MACHINE $BM_ARGS + + sleep 1 ; + j=`expr $j + 1` + done + cd - +} + +echo "---------- Starting Benchmarks ----------" +exec < bm_args.txt +while read line +do + BM_NAME=`echo $line | cut -f1 -d":"` + BM_ARGS=`echo $line | cut -f2 -d":"` + + # Setup for remote machine + echo "" > ~/.bmargs + echo "BM_NAME='$BM_NAME'" > ~/.bmargs + echo "BM_ARGS='$BM_ARGS'" > ~/.bmargs + + let "NUM_MACHINE= $1 + 0"; + + if [ $NUM_MACHINE -eq 0 ]; + then + echo "Wrong input.. ./runjava.sh " + exit 0 + fi + + echo "BM_NAME= $BM_NAME" + echo "BM_ARGS= $BM_ARGS" + echo "NUM_M = $NUM_MACHINE" + runjava $NUM_MACHINES + + echo "done run" + + killclients + + # Clean up + rm ~/.bmargs + rm ~/.tmpdir +done + +echo "----------- done ------------" + -- 2.34.1