From: adash Date: Mon, 28 Sep 2009 23:04:44 +0000 (+0000) Subject: changes to benchmark X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5ed7898c3ed73fbe6722d386c87d39f285ec90dd;p=IRC.git changes to benchmark --- diff --git a/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile b/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile index df0290dc..3df2a797 100644 --- a/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile +++ b/Robust/src/Benchmarks/Distributed/RainForest/dsm/makefile @@ -11,8 +11,8 @@ SRC=tmp${MAINCLASS}.java \ AStarPathFinder.java FLAGS1=-dsm -optimize -mainclass ${MAINCLASS} -FLAGS2=-dsm -dsmcaching -transstats -abortreaders -optimize -mainclass ${MAINCLASS} -FLAGS3=-dsm -dsmcaching -transstats -abortreaders -prefetch -optimize -mainclass ${MAINCLASS} -excprefetch BarrierServer.updateAge -excprefetch RainForest.main -excprefetch GameMap.hasRock -excprefetch GameMap.hasTree -trueprob 0.90 +FLAGS2=-dsm -dsmcaching -abortreaders -optimize -mainclass ${MAINCLASS} +FLAGS3=-dsm -dsmcaching -abortreaders -prefetch -optimize -mainclass ${MAINCLASS} -excprefetch BarrierServer.updateAge -excprefetch RainForest.main -excprefetch GameMap.hasRock -excprefetch GameMap.hasTree -trueprob 0.90 default: cpp ${MAINCLASS}.java > tmp1${MAINCLASS}.java diff --git a/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestClient.java b/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestClient.java index 9005176c..8d92eb61 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 ROW 400 /* columns in the map */ #define COLUMN 100 /* rows of in the map */ -#define ROUNDS 256 /* Number of moves by each player */ +#define ROUNDS 512 /* 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/Distributed/RainForest/java/RainForestServerExample.java b/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestServerExample.java index 8f9d3f56..efdf54c3 100644 --- a/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestServerExample.java +++ b/Robust/src/Benchmarks/Distributed/RainForest/java/RainForestServerExample.java @@ -1,4 +1,4 @@ -#define ROW 100 /* columns in the map */ +#define ROW 400 /* columns in the map */ #define COLUMN 100 /* rows of in the map */ public class RainForestServerExample { diff --git a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile index f7c448f5..4580b2ee 100644 --- a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile @@ -11,10 +11,11 @@ SRC3=${MAINCLASS}2.java \ ${MAINCLASS}Wrap.java \ BiGraph2.java \ Node2.java \ - EVector.java + EVector.java \ + ../../../../ClassLibrary/JavaDSM/Barrier.java FLAGS=-dsm -prefetch -optimize -excprefetch Em3d.main -excprefetch BiGraph.create -excprefetch Node.Node -excprefetch Node.fillTable -excprefetch Node.makeUniqueNeighbors -excprefetch Node.makeFromNodes -excprefetch Node.updateFromNodes -debug -mainclass ${MAINCLASS} -trueprob 0.85 -FLAGS1=-dsm -prefetch -dsmcaching -optimize -excprefetch Node.makeUniqueNeighbors -excprefetch EVector.ensureCapacity -excprefetch EVector.addElement -excprefetch BiGraph.makeFromNodes -excprefetch EVector.elementAt -excprefetch BiGraph.initializeNodes -excprefetch BiGraph.allocateNodes -mainclass ${MAINCLASS} -trueprob 0.85 +FLAGS1=-dsm -prefetch -transstats -dsmcaching -optimize -excprefetch Node.makeUniqueNeighbors -excprefetch EVector.ensureCapacity -excprefetch EVector.addElement -excprefetch BiGraph.makeFromNodes -excprefetch EVector.elementAt -excprefetch BiGraph.initializeNodes -excprefetch BiGraph.allocateNodes -mainclass ${MAINCLASS} -trueprob 0.85 FLAGS2=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.85 FLAGS3=-dsm -optimize -mainclass ${MAINCLASS} -trueprob 0.85 diff --git a/Robust/src/Benchmarks/Prefetch/SOR/dsm/makefile b/Robust/src/Benchmarks/Prefetch/SOR/dsm/makefile index 73d17786..3a312d8b 100644 --- a/Robust/src/Benchmarks/Prefetch/SOR/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/SOR/dsm/makefile @@ -17,15 +17,15 @@ SRC1=${MAINCLASS1}.java \ SORWrap.java \ ../../../../ClassLibrary/JavaDSM/Barrier.java -FLAGS=-dsm -prefetch -transstats -dsmcaching -optimize -excprefetch JGFSORBench.JGFSORBench -excprefetch JGFSORBenchSizeA.main -excprefetch JGFSORBench.RandomMatrix -excprefetch JGFSORBench.init_sync -excprefetch JGFSORBench.JGFkernel -trueprob 0.72 -FLAGS1=-dsm -dsmcaching -optimize -debug -mainclass ${MAINCLASS} +FLAGS=-dsm -prefetch -dsmcaching -optimize -excprefetch JGFSORBench.JGFSORBench -excprefetch JGFSORBenchSizeA.main -excprefetch JGFSORBench.RandomMatrix -excprefetch JGFSORBench.init_sync -excprefetch JGFSORBench.JGFkernel -trueprob 0.72 +FLAGS1=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} FLAGS2=-dsm -optimize default: ../../../../buildscript ${FLAGS2} -mainclass ${MAINCLASS} -o ${MAINCLASS}NPNC ${SRC} ../../../../buildscript ${FLAGS} -mainclass ${MAINCLASS} -o ${MAINCLASS}N ${SRC} - ../../../../buildscript ${FLAGS2} -mainclass ${MAINCLASS1} -o ${MAINCLASS1}NPNC ${SRC1} - ../../../../buildscript ${FLAGS} -mainclass ${MAINCLASS1} -o ${MAINCLASS1}N ${SRC1} +# ../../../../buildscript ${FLAGS2} -mainclass ${MAINCLASS1} -o ${MAINCLASS1}NPNC ${SRC1} +# ../../../../buildscript ${FLAGS} -mainclass ${MAINCLASS1} -o ${MAINCLASS1}N ${SRC1} clean: rm -rf tmpbuilddirectory diff --git a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBench.java b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBench.java index 3b22060d..325baefb 100644 --- a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBench.java +++ b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBench.java @@ -17,9 +17,6 @@ * All rights reserved. * * * **************************************************************************/ - -import java.util.Random; - public class JGFSORBench { int size; @@ -27,16 +24,10 @@ public class JGFSORBench { int JACOBI_NUM_ITER; long RANDOM_SEED; public int nthreads; - Random R; public double Gtotal; - public int cachelinesize; - public long sync[][]; - public JGFInstrumentor instr; - - public JGFSORBench(int nthreads, JGFInstrumentor instr){ + public JGFSORBench(int nthreads){ this.nthreads = nthreads; - this.instr = instr; datasizes = new int[4]; datasizes[0] = 1000; datasizes[1] = 1500; @@ -44,120 +35,65 @@ public class JGFSORBench { datasizes[3] = 8000; JACOBI_NUM_ITER = 100; RANDOM_SEED = 10101010; - R = new Random(RANDOM_SEED); Gtotal = 0.0; - cachelinesize = 128; } public void JGFsetsize(int size){ this.size = size; } - public static void JGFkernel(JGFSORBench sor, JGFInstrumentor instr) { - int numthreads; - numthreads = sor.nthreads; + public static void JGFkernel(JGFSORBench sor) { + int numthreads, datasize; - double G[][] = sor.RandomMatrix(sor.datasizes[sor.size], sor.datasizes[sor.size], sor.R); - int M = G.length; - int N = G[0].length; - double omega = 1.25; - int num_iterations = sor.JACOBI_NUM_ITER; + double[][] G; + int num_iterations; + numthreads = sor.nthreads; + datasize = sor.datasizes[sor.size]; + G = new double[datasize][]; + num_iterations = sor.JACOBI_NUM_ITER; + double omega = 1.25; double omega_over_four = omega * 0.25; double one_minus_omega = 1.0 - omega; // update interior points // - int Mm1 = M-1; - int Nm1 = N-1; - //spawn threads - int cachelinesize = sor.cachelinesize; - SORRunner thobjects[] = new SORRunner[numthreads]; - sor.sync = sor.init_sync(numthreads, cachelinesize); + SORWrap[] thobjects = new SORWrap[numthreads]; - JGFInstrumentor.startTimer("Section2:SOR:Kernel", instr.timers); + for(int i=0;i 1.0e-12 ){ - System.printString("Validation failed"); - System.printString("Gtotal = " + Gtotal + " " + dev + " " + size); - } - } - - /* - public void JGFtidyup(){ - System.gc(); - } - - public void JGFrun(int size){ - - - JGFInstrumentor.addTimer("Section2:SOR:Kernel", "Iterations",size); - - JGFsetsize(size); - JGFinitialise(); - JGFkernel(); - JGFvalidate(); - JGFtidyup(); - - - JGFInstrumentor.addOpsToTimer("Section2:SOR:Kernel", (double) (JACOBI_NUM_ITER)); - - JGFInstrumentor.printTimer("Section2:SOR:Kernel"); - } - */ - - public double[][] RandomMatrix(int M, int N, Random R) - { - double A[][] = new double[M][N]; - - for (int i=0; i Mm1) iupper = Mm1+1; + if (tmpid == (numthreads-1)) iupper = Mm1+1; + G[0]= new double[N]; + for(int i=ilow;i Mm1) iupper = Mm1+1; - if (id == (nthreads-1)) iupper = Mm1+1; - for (int p=0; p<2*num_iterations; p++) { + for (int p=0; p<2*numiterations; p++) { for (int i=ilow+(p%2); i 0) { - while (sync[id-1][0] < sync[id][0]) ; - } - if (id < nthreads -1) { - while (sync[id+1][0] < sync[id][0]) ; } - } - } + }//end of for + } //end of run() } diff --git a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile index 733713a2..338da540 100644 --- a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile +++ b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile @@ -16,7 +16,7 @@ FLAGS2=-thread -optimize -mainclass ${MAINCLASS2} -o ${MAINCLASS2} FLAGS=-thread -optimize -mainclass ${MAINCLASS} -o ${MAINCLASS} default: - ../../../../buildscript ${FLAGS} ${SRC1} +# ../../../../buildscript ${FLAGS} ${SRC1} ../../../../buildscript ${FLAGS2} ${SRC2} clean: diff --git a/Robust/src/Benchmarks/Prefetch/Tree/Tree.java b/Robust/src/Benchmarks/Prefetch/Tree/Tree.java index 91a65657..0f2cfbd1 100644 --- a/Robust/src/Benchmarks/Prefetch/Tree/Tree.java +++ b/Robust/src/Benchmarks/Prefetch/Tree/Tree.java @@ -11,8 +11,8 @@ public class TreeT extends Thread { TreeT t; atomic { t=global new TreeT(); - t.numTrees=5000; - t.TreeDepth=10; + t.numTrees=20000; + t.TreeDepth=5; } t.start((128<<24)|(195<<16)|(136<<8)|162); t.join(); @@ -27,11 +27,29 @@ public class TreeT extends Thread { tt = global new Tree[numTrees]; for(int i =0; i