new changes for getting results for TOPLAS
authoradash <adash>
Mon, 16 May 2011 00:43:54 +0000 (00:43 +0000)
committeradash <adash>
Mon, 16 May 2011 00:43:54 +0000 (00:43 +0000)
Robust/src/Benchmarks/Recovery/FileSystem/recovery/makefile
Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/MatrixMultiply.java
Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/makefile
Robust/src/Benchmarks/Recovery/SpamFilter/recovery/dstm.conf
Robust/src/Benchmarks/Recovery/Spider/recovery/QueryTask.java
Robust/src/Benchmarks/Recovery/Spider/recovery/Spider.java
Robust/src/Benchmarks/Recovery/Spider/recovery/makefile
Robust/src/Benchmarks/Recovery/runjava.sh

index b4ff273dbf459b6d0d58d4de8923e3f7d89da45a..4d744bd5bf3ecec9abad92e7e2774f7c0121873a 100644 (file)
@@ -3,7 +3,7 @@ SRC1=${MAINCLASS}.java \
      DistributedHashMap.java \
      Directory.java \
      DFile.java
-FLAGS= -recovery -recoverystats -transstats -dsm -dsmcaching -debug -nooptimize -mainclass ${MAINCLASS}
+FLAGS= -recovery -recoverystats -transstats -dsm -dsmcaching -debug -optimize -mainclass ${MAINCLASS}
 DSMFLAGS=-transstats -dsm -dsmcaching -optimize -mainclass ${MAINCLASS}
 default:
        ../../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC1}
index 58f1e15f680f2b378e1dcbf63452574c54273b61..d763c1af735a85e78db97c50b3166f4c21f64d4d 100644 (file)
@@ -58,7 +58,6 @@ public class MatrixMultiply extends Task {
         }
       }
     }
-
     atomic {
       dequeueTask();
     }
@@ -80,8 +79,7 @@ public class MatrixMultiply extends Task {
   }
 
   public static void main(String[] args) {
-    long fi,st;
-    st = System.currentTimeMillis();
+    //long st = System.currentTimeMillis();
     int NUM_THREADS=4;
     int SIZE = 1600;
     int increment = 80;
@@ -100,18 +98,27 @@ public class MatrixMultiply extends Task {
       System.exit(0);
     }
 
-    int[] mid = new int[8];
+    int[] mid = new int[16];
     mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
-    mid[1] = (128<<24)|(195<<16)|(136<<8)|163; //dc2
-    mid[2] = (128<<24)|(195<<16)|(136<<8)|164; //dc3
-    mid[3] = (128<<24)|(195<<16)|(136<<8)|165; //dc4
-    mid[4] = (128<<24)|(195<<16)|(136<<8)|166; //dc5
-    mid[5] = (128<<24)|(195<<16)|(136<<8)|167; //dc6
-    mid[6] = (128<<24)|(195<<16)|(136<<8)|168; //dc7
-    mid[7] = (128<<24)|(195<<16)|(136<<8)|169; //dc8
+    mid[1] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
+    mid[2] = (128<<24)|(195<<16)|(136<<8)|163; //dc2
+    mid[3] = (128<<24)|(195<<16)|(136<<8)|163; //dc2
+    mid[4] = (128<<24)|(195<<16)|(136<<8)|164; //dc3
+    mid[5] = (128<<24)|(195<<16)|(136<<8)|164; //dc3
+    mid[6] = (128<<24)|(195<<16)|(136<<8)|165; //dc4
+    mid[7] = (128<<24)|(195<<16)|(136<<8)|165; //dc4
+    mid[8] = (128<<24)|(195<<16)|(136<<8)|166; //dc5
+    mid[9] = (128<<24)|(195<<16)|(136<<8)|166; //dc5
+    mid[10] = (128<<24)|(195<<16)|(136<<8)|167; //dc6
+    mid[11] = (128<<24)|(195<<16)|(136<<8)|167; //dc6
+    mid[12] = (128<<24)|(195<<16)|(136<<8)|168; //dc7
+    mid[13] = (128<<24)|(195<<16)|(136<<8)|168; //dc7
+    mid[14] = (128<<24)|(195<<16)|(136<<8)|169; //dc8
+    mid[15] = (128<<24)|(195<<16)|(136<<8)|169; //dc8
 
 
     atomic {
+      //System.out.println("atomic 1");
       ts = global new TaskSet(NUM_THREADS);
 
       for( i = 0; i< NUM_THREADS; i++) {
@@ -121,6 +128,7 @@ public class MatrixMultiply extends Task {
     }
 
     atomic {
+      //System.out.println("atomic 2");
       matrix = global new MMul(SIZE, SIZE, SIZE);
       matrix.setValues();
       matrix.transpose();
@@ -134,7 +142,7 @@ public class MatrixMultiply extends Task {
         }
         ts.todo.push(mm);
       }
-
+      ////System.out.println("end atomic 2");
     }
 
     //long st = System.currentTimeMillis();
index e06976d75de171d0b5d922463c30c0b29caaeb60..5541e0b02d0915e53394165be074bf89d5ab7928 100644 (file)
@@ -6,9 +6,9 @@ SRC1=${MAINCLASS}.java \
      Worker.java \
      ../../../../ClassLibrary/JavaDSM/RecoveryStat.java
 
-FLAGS=-recovery -recoverystats -dsm -dsmtask -prefetch -dsmcaching -32bit -optimize -mainclass ${MAINCLASS} -excprefetch Task.isTodoListEmpty -excprefetch MatrixMultiply.output -excprefetch GlobalQueue.push -excprefetch MatrixMultiply.fillTodoList -excprefetch GlobalQueue.pop -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -excprefetch Work.checkCurrentWorkList -excprefetch MMul.getSum -excprefetch Task.grabTask -excprefetch Worker.Worker -excprefetch Task.dequeueTask -excprefetch Worker.run -trueprob 0.96
-DSMFLAGS= -dsm -dsmtask -transstats -dsmcaching -32bit -optimize -mainclass ${MAINCLASS} -excprefetch Task.isTodoListEmpty -excprefetch MatrixMultiply.output -excprefetch GlobalQueue.push -excprefetch MatrixMultiply.fillTodoList -excprefetch GlobalQueue.pop -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -excprefetch Work.checkCurrentWorkList -excprefetch MMul.getSum -excprefetch Task.grabTask
-RECOVERYFLAGS=-recovery -dsm -dsmtask -optimize -debug -mainclass ${MAINCLASS} 
+FLAGS=-recovery -recoverystats -dsm -dsmtask -transstats -dsmcaching -32bit -optimize -debug -mainclass ${MAINCLASS} -excprefetch Task.isTodoListEmpty -excprefetch MatrixMultiply.output -excprefetch GlobalQueue.push -excprefetch MatrixMultiply.fillTodoList -excprefetch GlobalQueue.pop -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -excprefetch Work.checkCurrentWorkList -excprefetch MMul.getSum -excprefetch Task.grabTask -excprefetch Worker.Worker -excprefetch Task.dequeueTask -trueprob 0.96
+DSMFLAGS= -dsm -dsmtask -transstats -prefetch -dsmcaching -32bit -optimize -mainclass ${MAINCLASS} -excprefetch Task.isTodoListEmpty -excprefetch MatrixMultiply.output -excprefetch GlobalQueue.push -excprefetch MatrixMultiply.fillTodoList -excprefetch GlobalQueue.pop -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -excprefetch Work.checkCurrentWorkList -excprefetch MMul.getSum -excprefetch Task.grabTask
+RECOVERYFLAGS=-recovery -dsm -dsmtask -nooptimize -debug -mainclass ${MAINCLASS} 
 
 default:
        ../../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC1}
index cbce2d59951f559f8a8d0c5019de4409a950011c..1a08f02b3219f875b9b4402ff85cb76b582878cd 100644 (file)
@@ -2,7 +2,3 @@
 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
index a7d570026fc48975eff4a18973a6c6b4f0ed2057..663ef1c6cbd5d3cc858e9f1e990471e57069cc5f 100644 (file)
@@ -55,7 +55,7 @@ public class QueryTask extends Task {
         return;
       }
       */
-
+      
       Socket s = new Socket();
 
       if(s.connect(hostname, 80) == -1) {
index 88a659e3d8b18d9facc940be8c9dab830d35be21..e1292afd5d7d997ac1cd6b1af7d008a264a2a7ce 100644 (file)
@@ -11,7 +11,7 @@ public class Spider {
     int maxDepth = 3;
     int maxSearchDepth = 10;
     int i, j;
-    String fm = "";
+    String fm = "dc-11.calit2.uci.edu";
     String fp = "";
     
     if(args.length != 3) {
index 358d3a802cb1c00a4d8b29c337b64e2a77766a62..577a8f11ce1b6e6bd4eeaf59ab0c2971b7a917d6 100644 (file)
@@ -3,7 +3,7 @@ SUBCLASS=Query
 SRC1=${MAINCLASS}.java
 SRC2=Global${SUBCLASS}.java
 SRC3=${SUBCLASS}Task.java
-FLAGS=-recoverystats -recovery -transstats -dsmcaching -32bit -dsm -dsmtask -optimize -mainclass ${MAINCLASS}
+FLAGS=-recoverystats -recovery -transstats -dsmcaching -32bit -dsm -dsmtask -optimize -debug -mainclass ${MAINCLASS}
 DSMFLAGS=-dsm -dsmtask -transstats -dsmcaching -debug -optimize -mainclass ${MAINCLASS}
 default:
 #      ../../../../buildscript ${DSMFLAGS} -o ${MAINCLASS}DSM GlobalQuery.java LocalQuery.java QueryTask.java Spider.java Task.java GlobalQueue.java Worker.java TaskSet.java
index 85e45feea8234350f706e7ec8d6fe2647996ef4b..2692a77bbe709af54f2a3a4b470d2d0b8b0423b9 100755 (executable)
@@ -11,7 +11,7 @@ BASEDIR=`pwd`
 RECOVERYDIR='recovery'
 JAVASINGLEDIR='java'
 WAITTIME=120
-KILLDELAY=10
+KILLDELAY=15
 LOGDIR=~/research/Robust/src/Benchmarks/Recovery/runlog
 DSTMDIR=${HOME}/research/Robust/src/Benchmarks/Prefetch/config
 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'
@@ -20,6 +20,7 @@ USER='adash'
 # 0 mean new test 
 # 1~8 machine id to be killed
 
+### Sequential Machine failure order ######
 ORDER=( 0 1 3 5 7 8 2    
         0 1 2 3 4 5 6 
         0 1 8 4 6 3 7 
@@ -70,6 +71,8 @@ function runMachines {
   
   DIR=`echo ${BASEDIR}\/${BM_DIR}\/${RECOVERYDIR}`;
   echo "DIR = $DIR";
+
+  echo $BM_NAME
  
   # Run machines
   while [ $k -gt 1 ]; do
@@ -110,7 +113,7 @@ function runNormalTest {
   cd -
 }
 
-########### Failure case
+########### Sequential Failure case ##########
 function runFailureTest {
 # Run java version
 # j=1;
@@ -160,6 +163,42 @@ function runFailureTest {
  cd -
 }
 
+####### Single machine failure Case ############
+function runSingleFailureTest {
+  BM_DIR=${BM_NAME}
+  fName="$BM_NAME.bin";
+  cd ${BM_DIR}
+
+  test_iter=1;
+
+#ORDER=( 0 1 8 4 6 3 7 );
+#SINGLE_ORDER=( 1 8 4 6 3 2 7 5 );
+  SINGLE_ORDER=( 8 4 );
+
+
+  for machinename in ${SINGLE_ORDER[@]}
+  do
+    outputIter=0;
+    for outputIter in 1 2 3 4 5 6 7 8
+    do
+      echo "------------------------------- Failure Test $test_iter ----------------------------" >> log-$outputIter
+    done
+    echo "------------------------------- Failure Test $test_iter ----------------------------"
+    runMachines log   
+    sleep 10           # wait until all machine run
+    test_iter=`expr $test_iter + 1`
+    echo "------------------------ dc-$machinename is killed ------------------------" >> log-$k
+    echo "------------------------ dc-$machinename is killed ------------------------"
+    killonemachine $fName $machinename
+    sleep $WAITTIME           # wait till the end of execution
+    killclientswithSignal $fName 8  #kill rest of the alive machines
+# Insert Randowm delay 
+      let "delay= $RANDOM % $KILLDELAY + 4"
+      sleep $delay
+  done
+ cd -
+}
+
 ###
 ###runRecovery <num iterations> <num machines> <recovery file name>
 ###
@@ -300,12 +339,16 @@ function testcase {
   # terminate if it doesn't have parameter
   let "NUM_MACHINE= $nummachines + 0";
 
-  echo "====================================== Normal Test =============================="
-  runNormalTest $NUM_MACHINES 1 
-  echo "================================================================================"
+#  echo "====================================== Normal Test =============================="
+#  runNormalTest $NUM_MACHINES 1 
+#  echo "================================================================================"
+
+#  echo "====================================== Failure Test ============================="
+#  runFailureTest $NUM_MACHINES
+#  echo "================================================================================="
 
-  echo "====================================== Failure Test ============================="
-  runFailureTest $NUM_MACHINES
+  echo "====================================== Single Failure Test ============================="
+  runSingleFailureTest $NUM_MACHINES
   echo "================================================================================="
 
 #  echo "=============== Running javasingle for ${BM_NAME} on 1 machines ================="
@@ -401,4 +444,5 @@ function dsmsingle {
 echo "---------- Starting Benchmarks ----------"
 nmach=$1
 source bm_args.txt
+#source bm_args_16threads.txt
 echo "----------- done ------------"