System.exit(0);\r
}\r
\r
- int[] mid = new int[8];\r
- mid[0] = (128<<24)|(195<<16)|(136<<8)|162;//dc-1\r
- mid[1] = (128<<24)|(195<<16)|(136<<8)|163;//dc-2\r
- mid[2] = (128<<24)|(195<<16)|(136<<8)|164;//dc-3\r
- mid[3] = (128<<24)|(195<<16)|(136<<8)|165;//dc-4\r
- mid[4] = (128<<24)|(195<<16)|(136<<8)|166;//dc-5\r
- mid[5] = (128<<24)|(195<<16)|(136<<8)|167;//dc-6\r
- mid[6] = (128<<24)|(195<<16)|(136<<8)|168;//dc-7\r
- mid[7] = (128<<24)|(195<<16)|(136<<8)|169;//dc-8\r
+ int[] mid = null;\r
+\r
+ if(NUM_THREADS <= 8 ) {\r
+ mid = new int[8];\r
+ mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1\r
+ mid[1] = (128<<24)|(195<<16)|(136<<8)|163; //dc2\r
+ mid[2] = (128<<24)|(195<<16)|(136<<8)|164; //dc3\r
+ mid[3] = (128<<24)|(195<<16)|(136<<8)|165; //dc4\r
+ mid[4] = (128<<24)|(195<<16)|(136<<8)|166; //dc5\r
+ mid[5] = (128<<24)|(195<<16)|(136<<8)|167; //dc6\r
+ mid[6] = (128<<24)|(195<<16)|(136<<8)|168; //dc7\r
+ mid[7] = (128<<24)|(195<<16)|(136<<8)|169; //dc8\r
+ } else {\r
+ mid = new int[16];\r
+ mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1\r
+ mid[1] = (128<<24)|(195<<16)|(136<<8)|162; //dc1\r
+ mid[2] = (128<<24)|(195<<16)|(136<<8)|163; //dc2\r
+ mid[3] = (128<<24)|(195<<16)|(136<<8)|163; //dc2\r
+ mid[4] = (128<<24)|(195<<16)|(136<<8)|164; //dc3\r
+ mid[5] = (128<<24)|(195<<16)|(136<<8)|164; //dc3\r
+ mid[6] = (128<<24)|(195<<16)|(136<<8)|165; //dc4\r
+ mid[7] = (128<<24)|(195<<16)|(136<<8)|165; //dc4\r
+ mid[8] = (128<<24)|(195<<16)|(136<<8)|166; //dc5\r
+ mid[9] = (128<<24)|(195<<16)|(136<<8)|166; //dc5\r
+ mid[10] = (128<<24)|(195<<16)|(136<<8)|167; //dc6\r
+ mid[11] = (128<<24)|(195<<16)|(136<<8)|167; //dc6\r
+ mid[12] = (128<<24)|(195<<16)|(136<<8)|168; //dc7\r
+ mid[13] = (128<<24)|(195<<16)|(136<<8)|168; //dc7\r
+ mid[14] = (128<<24)|(195<<16)|(136<<8)|169; //dc8\r
+ mid[15] = (128<<24)|(195<<16)|(136<<8)|169; //dc8\r
+ }\r
+\r
+ if(mid == null) {\r
+ System.out.println("Number of machines not initialized");\r
+ System.exit(1);\r
+ }\r
\r
FileSystem[] lus;\r
atomic {\r
int rows;
int cols;
- public Barrier(int n, threadinfo[] tinfo, GameMap[][] land, int maxage, int rows, int cols) {
- this.land=land;
- this.maxage=maxage;
- this.rows=rows;
- this.cols=cols;
- this.numthreads=n;
- this.tinfo=tinfo;
+ public Barrier(int tn, threadinfo[] ttinfo, GameMap[][] tland, int tmaxage, int trows, int tcols) {
+ land=tland;
+ maxage=tmaxage;
+ rows=trows;
+ cols=tcols;
+ numthreads=tn;
+ tinfo=ttinfo;
/*
this.tinfo=global new threadinfo[n];
for(int i=0; i<n; i++) {
boolean cont=true;
int count=0;
- /* Here we see if we are the first non-failed machine...if so, we operate the barrier...if not we wait for our signal */
+ // Here we see if we are the first non-failed machine...if so, we operate the barrier...if not we wait for our signal
while(cont&&count!=threadid) {
if (Thread.getStatus(count)==-1) {
count++;
}
if (count==threadid) {
- /* We are the first non-failed machine...*/
+ // We are the first non-failed machine....
int waitingon=numthreads-threadid-1;
boolean waiting[]=new boolean[waitingon];
int numThreads= tmprf.numThreads;
threadinfo[] tinfo;
Barrier mybarr;
+ int[] mid = null;
+
+ if(numThreads <= 8 ) {
+ mid = new int[8];
+ 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
+ } else {
+ mid = new int[16];
+ mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
+ 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
+ }
- int[] mid = new int[8];
- mid[0] = (128<<24)|(195<<16)|(136<<8)|162;//dc-1
- mid[1] = (128<<24)|(195<<16)|(136<<8)|163;//dc-2
- mid[2] = (128<<24)|(195<<16)|(136<<8)|164;//dc-3
- mid[3] = (128<<24)|(195<<16)|(136<<8)|165;//dc-4
- mid[4] = (128<<24)|(195<<16)|(136<<8)|166;//dc-5
- mid[5] = (128<<24)|(195<<16)|(136<<8)|167;//dc-6
- mid[6] = (128<<24)|(195<<16)|(136<<8)|168;//dc-7
- mid[7] = (128<<24)|(195<<16)|(136<<8)|169;//dc-8
+ if(mid == null) {
+ System.out.println("Number of machines not initialized");
+ System.exit(1);
+ }
// Init land and place rocks in boundaries
System.exit(0);
}
- //int[] mid = new int[16];
- int[] mid = new int[8];
- /*
- mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
- 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
- */
-
- 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
+ int[] mid = null;
+
+ if(NUM_THREADS <= 8 ) {
+ mid = new int[8];
+ 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
+ } else {
+ mid = new int[16];
+ mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
+ 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
+ }
+
+ if(mid == null) {
+ System.out.println("mid variable not initialized");
+ System.exit(1);
+ }
atomic {
//System.out.println("atomic 1");
}
public static void main(String[] args) {
- int[] mid = new int[8];
-
- /*
- mid[0] = (128<<24)|(195<<16)|(180<<8)|21; //dw-2
- mid[1] = (128<<24)|(195<<16)|(180<<8)|26; //dw-7
- */
- mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc-1.calit2
- mid[1] = (128<<24)|(195<<16)|(136<<8)|163; //dc-2.calit2
- mid[2] = (128<<24)|(195<<16)|(136<<8)|164; //dc-3.calit2
- mid[3] = (128<<24)|(195<<16)|(136<<8)|165; //dc-4.calit2
- mid[4] = (128<<24)|(195<<16)|(136<<8)|166; //dc-5.calit2
- mid[5] = (128<<24)|(195<<16)|(136<<8)|167; //dc-6.calit2
- mid[6] = (128<<24)|(195<<16)|(136<<8)|168; //dc-7.calit2
- mid[7] = (128<<24)|(195<<16)|(136<<8)|169; //dc-8.calit2
-
//Read options from command prompt
SpamFilter sf = new SpamFilter();
SpamFilter.parseCmdLine(args, sf);
int nthreads = sf.nthreads;
+ int[] mid = null;
+
+ if(nthreads <= 8 ) {
+ mid = new int[8];
+ 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
+ } else {
+ mid = new int[16];
+ mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
+ 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
+ }
+
+ if(mid == null) {
+ System.out.println("Number of machines not initialized");
+ System.exit(1);
+ }
+
//Create Global data structure
DistributedHashMap dhmap;
atomic {
hostname = new String(GlobalString.toLocalCharArray(getHostName()));
path = new String(GlobalString.toLocalCharArray(getPath()));
+ //Debug to check the presence for html files
System.out.println("hostname= " + hostname + " path= " + path);
GlobalStringBuffer gsb = global new GlobalStringBuffer(hostname);
gsb.append("/");
--- /dev/null
+Running the spider benchmark:
+
+1. cd into directory
+~/research/Robust/src/Benchmarks/Recovery/Spider/recovery/gendata
+
+2. compile GenerateWebFile.java
+ javac GenerateWebFile.java
+
+3. Run the class file
+ java GenerateWebFile
+
+4. copy the *.html from this directory to
+
}
int nQueue = 3;
- int mid[] = new int[8];
+ int[] mid = null;
+
+ if(NUM_THREADS <= 8 ) {
+ mid = new int[8];
+ 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
+ } else {
+ mid = new int[16];
+ mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
+ 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
+ }
+
+ if(mid == null) {
+ System.out.println("mid variable not initialized");
+ System.exit(1);
+ }
- 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[4] = (128<<24)|(195<<16)|(136<<8)|166;
- mid[5] = (128<<24)|(195<<16)|(136<<8)|167;
- mid[6] = (128<<24)|(195<<16)|(136<<8)|168;
- mid[7] = (128<<24)|(195<<16)|(136<<8)|169;
TaskSet ts;
atomic {
#testcase 8 MatrixMultiply:2048 80
#testcase 8 Spider:"dc-11.calit2.uci.edu" 10
-testcase 8 FileSystem:
+#testcase 8 FileSystem:
#testcase 8 SpamFilter:-e 500 -n 10
-#testcase 8 Game:
+testcase 8 Game:
--- /dev/null
+testcase 16 MatrixMultiply:2048 80
+#testcase 16 Spider:"dc-11.calit2.uci.edu" 10
+testcase 16 FileSystem:
+testcase 16 SpamFilter:-e 500 -n 10
+testcase 16 Game:
BASEDIR=`pwd`
RECOVERYDIR='recovery'
JAVASINGLEDIR='java'
-WAITTIME=120
-KILLDELAY=10
+WAITTIME=180
+KILLDELAY=6
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 ######
+## 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
echo ${BM_DIR}
cd ${BM_DIR}
+
+ NUMM=$NUM_MACHINE;
+ if [ $NUM_MACHINE == 16 ]; then
+ NUMM=8;
+ fi
+
tt=1;
while [ $tt -le $NUM_MACHINE ]; do
echo "------------------------------- Normal Test $1 ----------------------------" >> log-$tt
outputIter=0;
for outputIter in 1 2 3 4 5 6 7 8
do
- echo "------------------------------- Failure Test $test_iter ----------------------------" >> log-$outputIter
+ echo "------------------------------- Sequential Failure Test $test_iter ----------------------------" >> log-$outputIter
done
- echo "------------------------------- Failure Test $test_iter ----------------------------"
+ echo "------------------------------- Sequential Failure Test $test_iter ----------------------------"
runMachines log
sleep 10 # wait until all machine run
test_iter=`expr $test_iter + 1`
echo "------------------------ dc-$k is killed ------------------------"
killonemachine $fName $k
- let "delay= $RANDOM % $KILLDELAY + 15"
+ let "delay= $RANDOM % $KILLDELAY + 8"
sleep $delay
fi
done
test_iter=1;
-#ORDER=( 0 1 8 4 6 3 7 );
-#SINGLE_ORDER=( 1 8 4 6 3 2 7 5 );
- SINGLE_ORDER=( 8 );
+SINGLE_ORDER=( 1 8 4 6 3 2 7 5 );
+#SINGLE_ORDER=( 8 );
for machinename in ${SINGLE_ORDER[@]}
outputIter=0;
for outputIter in 1 2 3 4 5 6 7 8
do
- echo "------------------------------- Failure Test $test_iter ----------------------------" >> log-$outputIter
+ echo "------------------------------- Single Failure Test $test_iter ----------------------------" >> log-$outputIter
done
- echo "------------------------------- Failure Test $test_iter ----------------------------"
+ echo "------------------------------- Single Failure Test $test_iter ----------------------------"
runMachines log
sleep 10 # wait until all machine run
test_iter=`expr $test_iter + 1`
# terminate if it doesn't have parameter
let "NUM_MACHINE= $nummachines + 0";
-# echo "====================================== Normal Test =============================="
-# runNormalTest $NUM_MACHINES 1
-# echo "================================================================================"
-
- echo "====================================== Failure Test ============================="
- runSequentialFailureTest $NUM_MACHINES
- echo "================================================================================="
+ echo "====================================== Normal Test =============================="
+ runNormalTest $NUM_MACHINES 1
+ echo "================================================================================"
# echo "====================================== Single Failure Test ============================="
# runSingleFailureTest $NUM_MACHINES
# echo "================================================================================="
+# echo "====================================== Sequential Failure Test ============================="
+# runSequentialFailureTest $NUM_MACHINES
+# echo "================================================================================="
+
+
# echo "=============== Running javasingle for ${BM_NAME} on 1 machines ================="
# javasingle 1 ${BM_NAME}
# cd $TOPDIR
echo "---------- Starting Benchmarks ----------"
nmach=$1
-source bm_args.txt
-#source bm_args_16threads.txt
+#source bm_args.txt
+source bm_args_16threads.txt
echo "----------- done ------------"