From a0ada391733b47408d94b27d4c30414d4f902dd8 Mon Sep 17 00:00:00 2001 From: adash Date: Wed, 6 Aug 2008 18:47:39 +0000 Subject: [PATCH] fully compiled with new Barrier --- .../Benchmarks/Prefetch/Em3d/dsm/Em3d2.java | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3d2.java b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3d2.java index 93776f2e..1a544402 100644 --- a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3d2.java +++ b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3d2.java @@ -42,17 +42,14 @@ public class Em3d extends Thread { BiGraph bg; int upperlimit; int lowerlimit; - //Barrier barr; - String hostname; public Em3d() { } - public Em3d(BiGraph bg, int lowerlimit, int upperlimit, int numIter, int numDegree, int threadindex, String name) { + public Em3d(BiGraph bg, int lowerlimit, int upperlimit, int numIter, int numDegree, int threadindex) { this.bg = bg; this.lowerlimit = lowerlimit; this.upperlimit = upperlimit; this.numIter = numIter; - this.hostname = name; this.numDegree = numDegree; this.threadindex=threadindex; } @@ -62,42 +59,51 @@ public class Em3d extends Thread { Barrier barr; int degree; Random random; + String hname; - barr = new Barrier(hostname); + barr = new Barrier("128.195.175.78"); + //System.printString("Inside run\n"); atomic { iteration = numIter; degree = numDegree; random = new Random(lowerlimit); + //barr = mybarr; } + //System.printString("Here 1\n"); atomic { //This is going to conflict badly...Minimize work here bg.allocateNodes ( lowerlimit, upperlimit, threadindex); } Barrier.enterBarrier(barr); System.clearPrefetchCache(); + //System.printString("Here 2\n"); atomic { //initialize the eNodes bg.initializeNodes(bg.eNodes, bg.hNodes, lowerlimit, upperlimit, degree, random, threadindex); } Barrier.enterBarrier(barr); + //System.printString("Here 3\n"); atomic { //initialize the hNodes bg.initializeNodes(bg.hNodes, bg.eNodes, lowerlimit, upperlimit, degree, random, threadindex); } Barrier.enterBarrier(barr); + //System.printString("Here 4\n"); atomic { bg.makeFromNodes(bg.hNodes, lowerlimit, upperlimit, random); } Barrier.enterBarrier(barr); + //System.printString("Here 5\n"); atomic { bg.makeFromNodes(bg.eNodes, lowerlimit, upperlimit, random); } Barrier.enterBarrier(barr); + //System.printString("Here 6\n"); //Do the computation for (int i = 0; i < iteration; i++) { @@ -114,6 +120,7 @@ public class Em3d extends Thread { Barrier.enterBarrier(barr); + //System.printString("Here 7\n"); /* for hNodes */ atomic { for(int j = lowerlimit; j