From 0f9366bc548efd51686442d49180aba3727ec144 Mon Sep 17 00:00:00 2001 From: adash Date: Mon, 20 Jul 2009 22:00:24 +0000 Subject: [PATCH] changes in benchmarks for the PPoPP paper --- .../Distributed/RainForest/dsm/makefile | 2 +- .../RainForest/java/RainForestClient.java | 2 +- .../Benchmarks/Prefetch/2DConv/dsm/Makefile | 2 +- .../Benchmarks/Prefetch/2DFFT/dsm/Makefile | 2 +- .../Prefetch/MatrixMultiply/dsm/makefile | 2 +- .../Moldyn/dsm/JGFMolDynBenchSizeB.java | 2 +- .../Benchmarks/Prefetch/Moldyn/dsm/makefile | 7 +++--- .../javasingle/JGFMolDynBenchSizeB.java | 2 +- .../Prefetch/Moldyn/javasingle/makefile | 2 +- Robust/src/Runtime/DSTM/interface/dstm.h | 13 +++++++++- Robust/src/Runtime/DSTM/interface/signal.c | 25 +++++++++++++++++++ Robust/src/Runtime/DSTM/interface/trans.c | 9 ++++++- 12 files changed, 57 insertions(+), 13 deletions(-) diff --git a/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile b/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile index 9f117112..c79f9e0a 100644 --- a/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile +++ b/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile @@ -19,7 +19,7 @@ default: ./extractLines ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPNC ${SRC} ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPC ${SRC} -# ../../../../buildscript ${FLAGS3} -o ${MAINCLASS}N ${SRC} + ../../../../buildscript ${FLAGS3} -o ${MAINCLASS}N ${SRC} clean: rm tmp1RainForest.java diff --git a/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestClient.java b/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestClient.java index 0d72dc5d..9005176c 100644 --- a/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestClient.java +++ b/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestClient.java @@ -1,6 +1,6 @@ #define ROW 100 /* columns in the map */ #define COLUMN 100 /* rows of in the map */ -#define ROUNDS 200 /* Number of moves by each player */ +#define ROUNDS 256 /* 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 */ diff --git a/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile b/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile index 2d5dfe40..2fbab3e0 100644 --- a/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile +++ b/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile @@ -13,7 +13,7 @@ default: # ../../../../buildscript ${FLAGS} ${SRC1} -o ${MAINCLASS}N ../../../../buildscript ${FLAGS1} ${SRC2} -o ${MAINCLASS}NPNC ../../../../buildscript ${FLAGS2} ${SRC2} -o ${MAINCLASS}NPC -# ../../../../buildscript ${FLAGS} ${SRC2} -o ${MAINCLASS}N + ../../../../buildscript ${FLAGS} ${SRC2} -o ${MAINCLASS}N clean: rm -rf tmpbuilddirectory diff --git a/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile b/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile index c4fdf13f..38963d9f 100644 --- a/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile +++ b/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile @@ -10,7 +10,7 @@ FLAGS2=-dsm -optimize -dsmcaching -mainclass ${MAINCLASS} default: ../../../../buildscript ${FLAGS1} ${SRC} -o ${MAINCLASS}NPNC ../../../../buildscript ${FLAGS2} ${SRC} -o ${MAINCLASS}NPC -# ../../../../buildscript ${FLAGS} ${SRC} -o ${MAINCLASS}N + ../../../../buildscript ${FLAGS} ${SRC} -o ${MAINCLASS}N clean: rm -rf tmpbuilddirectory diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile index d70a6d49..064683cb 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile @@ -7,7 +7,7 @@ FLAGS2=-dsm -optimize -mainclass ${MAINCLASS} default: ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC1} ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPC ${SRC1} -# ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1} + ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1} # ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC200 ${SRC2} # ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N200 ${SRC2} diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeB.java b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeB.java index 716f31b5..3de1200a 100644 --- a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeB.java +++ b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeB.java @@ -30,7 +30,7 @@ public class JGFMolDynBenchSizeB { } JGFInstrumentor instr = new JGFInstrumentor(); - JGFInstrumentor.printHeader(3,0,nthreads); + JGFInstrumentor.printHeader(3,1,nthreads); JGFMolDynBench mold; atomic { diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile index ee86c559..108bee9e 100644 --- a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile @@ -1,4 +1,4 @@ -MAINCLASS=JGFMolDynBenchSizeC +MAINCLASS=JGFMolDynBenchSizeB SRC=${MAINCLASS}.java \ JGFInstrumentor.java \ JGFTimer.java \ @@ -7,14 +7,15 @@ SRC=${MAINCLASS}.java \ IntWrapper.java \ MDWrap.java \ ../../../../ClassLibrary/JavaDSM/Barrier.java -FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch particle.force -excprefetch particle.domove -excprefetch particle.mkekin -excprefetch TournamentBarrier.DoBarrier -excprefetch JGFMolDynBench.JGFvalidate -excprefetch JGFMolDynBench.JGFapplication -excprefetch JGFMolDynBench.JGFinitialise -excprefetch mdRunner.init -mainclass ${MAINCLASS} -trueprob 0.75 +FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch particle.force -excprefetch particle.domove -excprefetch particle.mkekin -excprefetch TournamentBarrier.DoBarrier -excprefetch JGFMolDynBench.JGFvalidate -excprefetch JGFMolDynBench.JGFapplication -excprefetch JGFMolDynBench.JGFinitialise -excprefetch mdRunner.init -excprefetch mdRunner.doinit -excprefetch mdRunner.doinit2 -mainclass ${MAINCLASS} -trueprob 0.75 +#FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch particle.force -excprefetch particle.domove -excprefetch particle.mkekin -excprefetch TournamentBarrier.DoBarrier -excprefetch JGFMolDynBench.JGFvalidate -excprefetch JGFMolDynBench.JGFapplication -excprefetch JGFMolDynBench.JGFinitialise -excprefetch mdRunner.init -mainclass ${MAINCLASS} -trueprob 0.75 FLAGS2=-dsm -optimize -mainclass ${MAINCLASS} FLAGS1=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.75 default: ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC} ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPC ${SRC} -# ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC} + ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC} clean: rm -rf tmpbuilddirectory/ diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeB.java b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeB.java index 6dc3aa5e..69a9a3d4 100644 --- a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeB.java +++ b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeB.java @@ -30,7 +30,7 @@ public class JGFMolDynBenchSizeB { } JGFInstrumentor instr = new JGFInstrumentor(); - JGFInstrumentor.printHeader(3,0,nthreads); + JGFInstrumentor.printHeader(3,1,nthreads); JGFMolDynBench mold; mold = new JGFMolDynBench(nthreads); diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/makefile b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/makefile index 521f09ea..85d65c07 100644 --- a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/makefile +++ b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/makefile @@ -1,4 +1,4 @@ -MAINCLASS=JGFMolDynBenchSizeC +MAINCLASS=JGFMolDynBenchSizeB SRC=${MAINCLASS}.java \ JGFInstrumentor.java \ JGFTimer.java \ diff --git a/Robust/src/Runtime/DSTM/interface/dstm.h b/Robust/src/Runtime/DSTM/interface/dstm.h index bd271231..9a993d88 100644 --- a/Robust/src/Runtime/DSTM/interface/dstm.h +++ b/Robust/src/Runtime/DSTM/interface/dstm.h @@ -57,7 +57,7 @@ //#define RETRYINTERVAL 20 //N (For Em3d, SOR, Moldyn benchmarks) //#define SHUTDOWNINTERVAL 3 //M #define RETRYINTERVAL 100 //N (For MatrixMultiply, 2DFFT benchmarks) -#define SHUTDOWNINTERVAL 1 //M +#define SHUTDOWNINTERVAL 1 //M #include #include @@ -95,6 +95,17 @@ /*******Global statistics *********/ extern int numprefetchsites; +/*********************************** + * Global Variables for statistics + **********************************/ +#ifdef TRANSSTATS +extern int numTransCommit; +extern int numTransAbort; +extern int nSoftAbort; +extern int nSoftAbortAbort; +extern int nSoftAbortCommit; +#endif + double idForTimeDelay; /* TODO Remove, necessary to get time delay for starting transRequest for this id */ int transCount; /* TODO Remove, necessary to the transaction id */ diff --git a/Robust/src/Runtime/DSTM/interface/signal.c b/Robust/src/Runtime/DSTM/interface/signal.c index 094e9c9d..d95d096e 100644 --- a/Robust/src/Runtime/DSTM/interface/signal.c +++ b/Robust/src/Runtime/DSTM/interface/signal.c @@ -14,10 +14,13 @@ extern int bytesSent; extern int bytesRecv; extern int totalObjSize; extern unsigned int myIpAddr; +extern int getResponse; +extern int sendRemoteReq; void handle(); extern pfcstats_t *evalPrefetch; +/* void transStatsHandler(int sig, siginfo_t* info, void *context) { #ifdef TRANSSTATS FILE *fp; @@ -42,6 +45,28 @@ 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"); + printf("myIpAddr = %x\n", myIpAddr); + printf("numTransAbort = %d\n", numTransAbort); + printf("numTransCommit = %d\n", numTransCommit); + printf("nchashSearch = %d\n", nchashSearch); + printf("nmhashSearch = %d\n", nmhashSearch); + printf("nprehashSearch = %d\n", nprehashSearch); + printf("nRemoteReadSend = %d\n", nRemoteSend); + printf("nSoftAbort = %d\n", nSoftAbort); + printf("bytesSent = %d\n", bytesSent); + printf("bytesRecv = %d\n", bytesRecv); + printf("totalObjSize= %d\n", totalObjSize); + printf("sendRemoteReq= %d\n", sendRemoteReq); + printf("getResponse= %d\n", getResponse); + printf("**********************************\n"); + 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 b6ac84bf..8e2ba01c 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -72,6 +72,8 @@ int nSoftAbort = 0; int bytesSent = 0; int bytesRecv = 0; int totalObjSize = 0; +int sendRemoteReq = 0; +int getResponse = 0; void printhex(unsigned char *, int); plistnode_t *createPiles(); @@ -1469,6 +1471,9 @@ void sendPrefetchReq(prefetchpile_t *mcpilenode, int sd) { *((int*)buf) = tmp->numoffset; buf+=sizeof(int); *((unsigned int *)buf) = tmp->oid; +#ifdef TRANSSTATS + sendRemoteReq++; +#endif buf+=sizeof(unsigned int); *((unsigned int *)buf) = myIpAddr; buf += sizeof(unsigned int); @@ -1493,7 +1498,9 @@ int getPrefetchResponse(int sd) { recv_data((int)sd, &length, sizeof(int)); size = length - sizeof(int); char recvbuffer[size]; - +#ifdef TRANSSTATS + getResponse++; +#endif recv_data((int)sd, recvbuffer, size); control = *((char *) recvbuffer); if(control == OBJECT_FOUND) { -- 2.34.1