From 8e068bd8a860ab9c1ef8a03f98cbfa57a958906b Mon Sep 17 00:00:00 2001 From: adash Date: Sat, 13 Mar 2010 01:58:40 +0000 Subject: [PATCH] changes --- .../Recovery/Spider/recovery/QueryTask.java | 2 +- .../Recovery/Spider/recovery/Spider.java | 4 +++- .../Recovery/Spider/recovery/dstm.conf | 14 ++++++++------ .../Recovery/Spider/recovery/makefile | 6 ++++-- Robust/src/Runtime/DSTM/interface/dstm.h | 4 ++-- Robust/src/Runtime/DSTM/interface/dstmserver.c | 2 +- Robust/src/Runtime/DSTM/interface/queue.c | 1 + Robust/src/Runtime/DSTM/interface/signal.c | 4 ++-- Robust/src/Runtime/DSTM/interface/trans.c | 17 +++++++++-------- 9 files changed, 31 insertions(+), 23 deletions(-) diff --git a/Robust/src/Benchmarks/Recovery/Spider/recovery/QueryTask.java b/Robust/src/Benchmarks/Recovery/Spider/recovery/QueryTask.java index bff5d6d1..54878492 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/recovery/QueryTask.java +++ b/Robust/src/Benchmarks/Recovery/Spider/recovery/QueryTask.java @@ -25,7 +25,7 @@ public class QueryTask extends Task { atomic { depth = ((GlobalQuery)myWork).getDepth(); - max = this.maxDepth; + max = this.maxDepth; maxSearch = this.maxSearchDepth; } diff --git a/Robust/src/Benchmarks/Recovery/Spider/recovery/Spider.java b/Robust/src/Benchmarks/Recovery/Spider/recovery/Spider.java index 94aa7596..9ba0cd3e 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/recovery/Spider.java +++ b/Robust/src/Benchmarks/Recovery/Spider/recovery/Spider.java @@ -47,7 +47,7 @@ public class Spider { atomic { firstmachine = global new GlobalString(fm); - firstpage = global new GlobalString("");; + firstpage = global new GlobalString(""); works = global new Work[NUM_THREADS]; qt = global new QueryTask[NUM_THREADS]; @@ -57,7 +57,9 @@ public class Spider { GlobalQueue todoList = global new GlobalQueue(); DistributedHashMap visitedList = global new DistributedHashMap(500, 500, 0.75f); + //DistributedHashMap visitedList = global new DistributedHashMap(500, 0.75f); DistributedHashMap results = global new DistributedHashMap(100, 100, 0.75f); + //DistributedHashMap results = global new DistributedHashMap(100, 0.75f); DistributedLinkedList results_list = global new DistributedLinkedList(); todoList.push(firstquery); diff --git a/Robust/src/Benchmarks/Recovery/Spider/recovery/dstm.conf b/Robust/src/Benchmarks/Recovery/Spider/recovery/dstm.conf index 6deb6935..cbce2d59 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/recovery/dstm.conf +++ b/Robust/src/Benchmarks/Recovery/Spider/recovery/dstm.conf @@ -1,6 +1,8 @@ -128.195.180.21 -128.195.180.26 -#128.195.180.24 -#128.195.136.162 -#128.195.136.163 -#128.195.136.164 +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/Spider/recovery/makefile b/Robust/src/Benchmarks/Recovery/Spider/recovery/makefile index 407e1b34..88e489b4 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/recovery/makefile +++ b/Robust/src/Benchmarks/Recovery/Spider/recovery/makefile @@ -3,9 +3,11 @@ SUBCLASS=Query SRC1=${MAINCLASS}.java SRC2=Global${SUBCLASS}.java SRC3=${SUBCLASS}Task.java -FLAGS= -recoverystats -recovery -dsmcaching -dsm -dsmtask -optimize -mainclass ${MAINCLASS} +FLAGS=-recoverystats -recovery -transstats -dsmcaching -dsm -dsmtask -debug -nooptimize -mainclass ${MAINCLASS} +DSMFLAGS=-dsm -dsmtask -sandbox -transstats -debug -nooptimize -mainclass ${MAINCLASS} default: - ../../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC2} ${SRC3} ${SRC1} +# ../../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC2} ${SRC3} ${SRC1} + ../../../../buildscript ${DSMFLAGS} -o ${MAINCLASS}DSM ${SRC2} ${SRC3} ${SRC1} clean: rm -rf tmpbuilddirectory diff --git a/Robust/src/Runtime/DSTM/interface/dstm.h b/Robust/src/Runtime/DSTM/interface/dstm.h index b7913809..ed76898e 100644 --- a/Robust/src/Runtime/DSTM/interface/dstm.h +++ b/Robust/src/Runtime/DSTM/interface/dstm.h @@ -57,8 +57,8 @@ //Prefetch tuning paramters //#define RETRYINTERVAL 20 //N (For Em3d, SOR, Moldyn benchmarks) //#define SHUTDOWNINTERVAL 3 //M -#define RETRYINTERVAL 100 //N (For MatrixMultiply, 2DFFT, 2DConv benchmarks) -#define SHUTDOWNINTERVAL 1 //M +#define RETRYINTERVAL 1 //N (For MatrixMultiply, 2DFFT, 2DConv benchmarks) +#define SHUTDOWNINTERVAL 75 //M #define NUM_TRY_TO_COMMIT 2 #define MEM_ALLOC_THRESHOLD 20485760//20MB diff --git a/Robust/src/Runtime/DSTM/interface/dstmserver.c b/Robust/src/Runtime/DSTM/interface/dstmserver.c index 62de32aa..6a08dc32 100644 --- a/Robust/src/Runtime/DSTM/interface/dstmserver.c +++ b/Robust/src/Runtime/DSTM/interface/dstmserver.c @@ -1042,7 +1042,7 @@ void processReqNotify(unsigned int numoid, unsigned int *oidarry, unsigned short char msg[1+ 2 * sizeof(unsigned int) + sizeof(unsigned short)]; int sd; struct sockaddr_in remoteAddr; - int bytesSent; + //int bytesSent; int size; int i = 0; diff --git a/Robust/src/Runtime/DSTM/interface/queue.c b/Robust/src/Runtime/DSTM/interface/queue.c index 75f79ac3..8174397e 100644 --- a/Robust/src/Runtime/DSTM/interface/queue.c +++ b/Robust/src/Runtime/DSTM/interface/queue.c @@ -83,6 +83,7 @@ void * gettail() { return memory+tailoffset+sizeof(int); } + int numavailable() { int tmp=tailoffset; int available=0; diff --git a/Robust/src/Runtime/DSTM/interface/signal.c b/Robust/src/Runtime/DSTM/interface/signal.c index 0c2d9c6a..7f7f143a 100644 --- a/Robust/src/Runtime/DSTM/interface/signal.c +++ b/Robust/src/Runtime/DSTM/interface/signal.c @@ -22,6 +22,7 @@ extern int sendRemoteReq; void handle(); extern pfcstats_t *evalPrefetch; +/* void transStatsHandler(int sig, siginfo_t* info, void *context) { #ifdef TRANSSTATS char filepath[200], exectime[10]; @@ -68,8 +69,8 @@ void transStatsHandler(int sig, siginfo_t* info, void *context) { exit(0); #endif } +*/ -/* void transStatsHandler(int sig, siginfo_t* info, void *context) { #ifdef TRANSSTATS printf("****** Transaction Stats ******\n"); @@ -91,7 +92,6 @@ void transStatsHandler(int sig, siginfo_t* info, void *context) { exit(0); #endif } -*/ void handle() { #ifdef TRANSSTATS diff --git a/Robust/src/Runtime/DSTM/interface/trans.c b/Robust/src/Runtime/DSTM/interface/trans.c index 9c2e4ffe..ec852ce3 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -318,7 +318,7 @@ inline int findmax(int *array, int arraylength) { return max; } -//#define INLINEPREFETCH +#define INLINEPREFETCH #define PREFTHRESHOLD 0 /* This function is a prefetch call generated by the compiler that @@ -933,7 +933,7 @@ plistnode_t *createPiles() { * Sends a transrequest() to each remote machines for objects found remotely * and calls handleLocalReq() to process objects found locally */ int transCommit() { - char buffer[30]; + //char buffer[30]; unsigned int tot_bytes_mod, *listmid; plistnode_t *pile, *pile_ptr; char treplyretry; /* keeps track of the common response that needs to be sent */ @@ -1196,9 +1196,9 @@ int transCommit() { /* wait a random amount of time before retrying to commit transaction*/ if(treplyretry) { treplyretryCount++; - if(treplyretryCount >= NUM_TRY_TO_COMMIT) - exponentialdelay(); - else + // if(treplyretryCount >= NUM_TRY_TO_COMMIT) + // exponentialdelay(); + // else randomdelay(); #ifdef TRANSSTATS nSoftAbort++; @@ -1954,7 +1954,7 @@ int startRemoteThread(unsigned int oid, unsigned int mid) { int sock; struct sockaddr_in remoteAddr; char msg[1 + sizeof(unsigned int)]; - int bytesSent; + //int bytesSent; int status; if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { @@ -2091,7 +2091,7 @@ int reqNotify(unsigned int *oidarry, unsigned short *versionarry, unsigned int n struct sockaddr_in remoteAddr; char msg[1 + numoid * (sizeof(unsigned short) + sizeof(unsigned int)) + 3 * sizeof(unsigned int)]; char *ptr; - int bytesSent; + //int bytesSent; int status, size; unsigned short version; unsigned int oid,mid; @@ -2221,7 +2221,8 @@ int notifyAll(threadlist_t **head, unsigned int oid, unsigned int version) { unsigned int mid; struct sockaddr_in remoteAddr; char msg[1 + sizeof(unsigned short) + 2*sizeof(unsigned int)]; - int sock, status, size, bytesSent; + int sock, status, size; + //int bytesSent; while(*head != NULL) { ptr = *head; -- 2.34.1