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}
}
}
}
-
atomic {
dequeueTask();
}
}
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;
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++) {
}
atomic {
+ //System.out.println("atomic 2");
matrix = global new MMul(SIZE, SIZE, SIZE);
matrix.setValues();
matrix.transpose();
}
ts.todo.push(mm);
}
-
+ ////System.out.println("end atomic 2");
}
//long st = System.currentTimeMillis();
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}
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
return;
}
*/
-
+
Socket s = new Socket();
if(s.connect(hostname, 80) == -1) {
int maxDepth = 3;
int maxSearchDepth = 10;
int i, j;
- String fm = "";
+ String fm = "dc-11.calit2.uci.edu";
String fp = "";
if(args.length != 3) {
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
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'
# 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
DIR=`echo ${BASEDIR}\/${BM_DIR}\/${RECOVERYDIR}`;
echo "DIR = $DIR";
+
+ echo $BM_NAME
# Run machines
while [ $k -gt 1 ]; do
cd -
}
-########### Failure case
+########### Sequential Failure case ##########
function runFailureTest {
# Run java version
# j=1;
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>
###
# 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 ================="
echo "---------- Starting Benchmarks ----------"
nmach=$1
source bm_args.txt
+#source bm_args_16threads.txt
echo "----------- done ------------"