From: adash Date: Thu, 25 Feb 2010 22:14:46 +0000 (+0000) Subject: modified script for other results X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=da1a8b17ac54a701bb43f0314c0228eb66cbd2f2;p=IRC.git modified script for other results remove unnecessary dstm.conf file some changes to increase execution time for the Game benchmark --- diff --git a/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java b/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java index 2c9fa263..37738fac 100644 --- a/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java +++ b/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java @@ -1,12 +1,12 @@ #define ROW 400 /* columns in the map */ #define COLUMN 100 /* rows of in the map */ -#define ROUNDS 512 /* Number of moves by each player */ +#define ROUNDS 1000 /* Number of moves by each player */ #define PLAYERS 20 /* Number of Players when num Players != num of client machines */ #define RATI0 0.5 /* Number of lumberjacks to number of planters */ #define BLOCK 3 /* Area around the gamer to consider */ #define TREE_ZONE 0.4 /* Max percentage of trees in a zone */ #define AGEUPDATETHRESHOLD 16 /* How frequently/how many rounds to increment age of tree */ -#define MAXAGE 100 /* Max age of a tree */ +#define MAXAGE 200 /* Max age of a tree */ #define LUMBERJACK 0 /* If lumberjack */ diff --git a/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java b/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java index 3aade1d8..9e3fedcc 100644 --- a/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java +++ b/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java @@ -1,12 +1,12 @@ #define ROW 400 /* columns in the map */ #define COLUMN 100 /* rows of in the map */ -#define ROUNDS 512 /* Number of moves by each player */ +#define ROUNDS 1000 /* Number of moves by each player */ #define PLAYERS 20 /* Number of Players when num Players != num of client machines */ #define RATI0 0.5 /* Number of lumberjacks to number of planters */ #define BLOCK 3 /* Area around the gamer to consider */ #define TREE_ZONE 0.4 /* Max percentage of trees in a zone */ #define AGEUPDATETHRESHOLD 16 /* How frequently/how many rounds to increment age of tree */ -#define MAXAGE 100 /* Max age of a tree */ +#define MAXAGE 200 /* Max age of a tree */ #define LUMBERJACK 0 /* If lumberjack */ @@ -59,6 +59,10 @@ public class RainForest extends Thread { } Random rand = new Random(id); + + long st = System.currentTimeMillis(); + long fi; + // Generate random numbers between 1 and row index/column index int maxValue = ROW - 1; int minValue = 1; @@ -94,12 +98,13 @@ public class RainForest extends Thread { Barrier.enterBarrier(id,mytinfo,nthreads); } - System.out.println("\n\n\nI'm done\n\n\n"); - + fi = System.currentTimeMillis(); + System.out.println("\n\n\n I'm Done - Time Elapse : " + (double)((fi-st)/1000) +"\n\n\n"); + + RecoveryStat.printRecoveryStat(); while(true) { - sleep(300000); + sleep(1000000); } - } public static void main(String[] args) { diff --git a/Robust/src/Benchmarks/Recovery/Game/recovery/makefile b/Robust/src/Benchmarks/Recovery/Game/recovery/makefile index 3b9771b4..b4b5a69a 100644 --- a/Robust/src/Benchmarks/Recovery/Game/recovery/makefile +++ b/Robust/src/Benchmarks/Recovery/Game/recovery/makefile @@ -12,6 +12,7 @@ SRC=tmp${MAINCLASS}.java \ ../../../../ClassLibrary/JavaDSM/Thread.java FLAGS1=-dsm -recoverystats -recovery -optimize -mainclass ${MAINCLASS} +DSMFLAGS=-dsm -optimize -mainclass ${MAINCLASS} default: cpp ${MAINCLASS}.java > tmp1${MAINCLASS}.java diff --git a/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/dstm.conf b/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/dstm.conf deleted file mode 100644 index 35fab289..00000000 --- a/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/dstm.conf +++ /dev/null @@ -1,11 +0,0 @@ -128.195.180.21 -#128.195.180.26 -#128.195.136.162 -#128.195.136.163 -#128.195.136.164 -#128.195.136.165 -#128.195.136.166 -#128.195.136.167 -#128.195.136.168 -#128.195.136.169 - diff --git a/Robust/src/Benchmarks/Recovery/runjava.sh b/Robust/src/Benchmarks/Recovery/runjava.sh index 824ec333..2f95268a 100755 --- a/Robust/src/Benchmarks/Recovery/runjava.sh +++ b/Robust/src/Benchmarks/Recovery/runjava.sh @@ -5,11 +5,16 @@ # ./runjava.sh # +#set -x + BASEDIR=`pwd` RECOVERYDIR='recovery' JAVASINGLEDIR='java' -WAITTIME=1200 +WAITTIME=200 KILLDELAY=20 +LOGDIR=~/research/Robust/src/Benchmarks/Recovery/runlog +MACHINELIST='dc-1.calit2.uci.edu dc-2.calit2.uci.edu dc-3.calit2.uci.edu dc-4.calit2.uci.edu dc-5.calit2.uci.edu dc-6.calit2.uci.edu dc-7.calit2.uci.edu dc-8.calit2.uci.edu' +USER='adash' # 0 mean new test # 1~8 machine id to be killed @@ -25,7 +30,7 @@ function killclients { fileName=$1 while [ $i -le $2 ]; do echo "killing dc-$i ${fileName}" - ssh dc-${i} pkill -u jihoonl -f ${fileName} + ssh dc-${i} pkill -u ${USER} -f ${fileName} i=`expr $i + 1` done } @@ -35,7 +40,7 @@ function killonemachine { fileName=$1 let "machine= $2"; echo "killing dc-$machine ${fileName}"; - ssh dc-${machine} pkill -u jihoonl -f ${fileName} + ssh dc-${machine} pkill -u ${USER} -f ${fileName} } # runmachines @@ -133,6 +138,78 @@ function runFailureTest { cd - } +function runDSM { + i=0; + DIR=`pwd` + HOSTNAME=`hostname` + while [ $i -lt $1 ]; do + echo "$DIR" > ~/.tmpdir + echo "bin=$3" > ~/.tmpvars + ct=0 + MACHINES='' + for j in $MACHINELIST; do + if [ $ct -lt $2 ]; then + if [ "$j" != "$HOSTNAME" ]; then + MACHINES="$MACHINES $j" + fi + fi + let ct=$ct+1 + done + + rm dstm.conf + DSTMDIR=${HOME}/research/Robust/src/Benchmarks/Prefetch/config + if [ $2 -eq 2 ]; then + arg=$ARGS2 + ln -s ${DSTMDIR}/dstm_2.conf dstm.conf + fi + if [ $2 -eq 3 ]; then + arg=$ARGS3 + ln -s ${DSTMDIR}/dstm_3.conf dstm.conf + fi + if [ $2 -eq 4 ]; then + arg=$ARGS4 + ln -s ${DSTMDIR}/dstm_4.conf dstm.conf + fi + if [ $2 -eq 5 ]; then + arg=$ARGS5 + ln -s ${DSTMDIR}/dstm_5.conf dstm.conf + fi + if [ $2 -eq 6 ]; then + arg=$ARGS6 + ln -s ${DSTMDIR}/dstm_6.conf dstm.conf + fi + if [ $2 -eq 7 ]; then + arg=$ARGS7 + ln -s ${DSTMDIR}/dstm_7.conf dstm.conf + fi + if [ $2 -eq 8 ]; then + arg=$ARGS8 + ln -s ${DSTMDIR}/dstm_8.conf dstm.conf + fi + chmod +x ~/.tmpvars + for machine in `echo $MACHINES` + do + ssh ${machine} 'cd `cat ~/.tmpdir`; source ~/.tmpvars; ./$bin' & + echo "" + done + sleep 2 + perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl clear_stats settings=switch/clearsettings.txt + /usr/bin/time -f "%e" ./$3 master $arg 2> ${LOGDIR}/tmp + perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl settings=switch/settings.txt + cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}.txt + if [ $i -eq 0 ];then echo "

Benchmark=${3} Thread=${2} Extension=${EXTENSION}


" > ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html ;fi + cat ${LOGDIR}/tmp >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html + echo "Network Stats
" >> ${LOGDIR}/${3}_${EXTENSION}_${2}Thrd_a.html + mv ${TOPDIR}/html/dell.html ${LOGDIR}/${3}_${2}Thrd_${EXTENSION}_${i}.html + echo "Terminating ... " + for machine in `echo $MACHINES` + do + ssh ${machine} 'source ~/.tmpvars; killall $bin' + done + sleep 2 + i=`expr $i + 1` + done +} function testcase { nummachines=$1 @@ -150,16 +227,79 @@ function testcase { # terminate if it doesn't have parameter let "NUM_MACHINE= $nummachines + 0"; +# +# echo "====================================== Normal Test ==============================" +# runNormalTest $NUM_MACHINES 1 +# echo "================================================================================" +# +# echo "====================================== Failure Test =============================" +# runFailureTest $NUM_MACHINES +# echo "=================================================================================" +# +# echo "====================================== Recovery Execution Time =============================" +# for count in 2 4 6 8 +# do +# echo "------- Running $count threads $BMDIR non-prefetch + non-cache on $count machines -----" +# runRecovery 1 $count $NONPREFETCH_NONCACHE +# done +# echo "=================================================================================" +# +# echo "====================================== Normal DSM Execution Time =============================" +# for count in 2 4 6 8 +# do +# echo "------- Running $count threads $BMDIR non-prefetch + non-cache on $count machines -----" +# runDSM 1 $count $NONPREFETCH_NONCACHE +# done +# echo "=================================================================================" +# + echo "=============== Running javasingle for ${BM_NAME} on 1 machines =================" + javasingle 1 ${BM_NAME} + cd $TOPDIR + echo "=================================================================================" - echo "====================================== Normal Test ==============================" - runNormalTest $NUM_MACHINES 1 - echo "================================================================================" - - echo "====================================== Failure Test =============================" - runFailureTest $NUM_MACHINES + echo "=============== Running recoverysingle for ${BM_NAME} on 1 machines =================" + recoverysingle 1 ${BM_NAME} + cd $TOPDIR echo "=================================================================================" + + } +function javasingle { + DIR=`echo ${BASEDIR}\/${2}\/${JAVASINGLEDIR}`; + cd $DIR + echo ${BM_ARGS} + i=0; + echo "ssh dc-1 cd $DIR'; ./${2}.bin 1 ${BM_ARGS}"; + while [ $i -lt $1 ]; do + /usr/bin/time -f "%e" ./${2}.bin 1 ${BM_ARGS} 2> ${DIR}/tmp + cat ${DIR}/tmp >> ${LOGDIR}/${2}_javasingle.txt + sleep 2 + i=`expr $i + 1` + done +} + +function recoverysingle { + DIR=`echo ${BASEDIR}\/${2}\/${RECOVERYDIR}`; + cd $DIR + echo ${BM_ARGS} + rm dstm.conf + DSTMDIR=${HOME}/research/Robust/src/Benchmarks/Prefetch/config + ln -s ${DSTMDIR}/dstm_1.conf dstm.conf + cd `pwd` + i=0; + fName="${2}.bin"; + while [ $i -lt $1 ]; do + echo "Running master machine ... " + echo "ssh dc-1 cd $DIR'; ./${2}.bin master 1 ${BM_ARGS}"; + ssh dc-1 'cd '$DIR'; ./'${2}'.bin master '1 ${BM_ARGS} >> ${LOGDIR}/${2}_recoverysingle.txt 2>&1 & + echo "Start waiting" + sleep $WAITTIME + echo "killing dc-1 ${fName}" + pkill -u ${USER} -f ${fName} + i=`expr $i + 1` + done +} echo "---------- Starting Benchmarks ----------" nmach=$1