bug fix for lookupservice java version( now works fine for 8 threads)
authoradash <adash>
Tue, 10 Mar 2009 01:13:03 +0000 (01:13 +0000)
committeradash <adash>
Tue, 10 Mar 2009 01:13:03 +0000 (01:13 +0000)
change makefiles
get rid of print statements

Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile
Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile
Robust/src/Benchmarks/Prefetch/ManualPrefetch/2DConv/ConvolutionSizeC.java
Robust/src/Benchmarks/Prefetch/ManualPrefetch/RainForest/RainForest.java
Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile
Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile
Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBench.java

index deccf978eef093d71ee239dbe2f24df5bc8d6529..2fbab3e066427ab10bdfcc365e3c9261d8bd3ca3 100644 (file)
@@ -4,6 +4,7 @@ SRC1=${MAINCLASS}SizeB.java
 SRC2=${MAINCLASS}SizeC.java
 FLAGS =-dsm -dsmcaching -prefetch -optimize -excprefetch Image.initKernel -excprefetch Image.setValues -excprefetch Convolution.main -trueprob 0.95 -mainclass ${MAINCLASS}
 FLAGS1=-dsm -optimize -mainclass ${MAINCLASS}
+FLAGS2=-dsm -optimize -dsmcaching -mainclass ${MAINCLASS}
 
 default:
 #      ../../../../buildscript ${FLAGS1} ${SRC} -o ${MAINCLASS}NPNC
@@ -11,6 +12,7 @@ default:
 #      ../../../../buildscript ${FLAGS1} ${SRC1} -o ${MAINCLASS}NPNC
 #      ../../../../buildscript ${FLAGS} ${SRC1} -o ${MAINCLASS}N
        ../../../../buildscript ${FLAGS1} ${SRC2} -o ${MAINCLASS}NPNC
+       ../../../../buildscript ${FLAGS2} ${SRC2} -o ${MAINCLASS}NPC
        ../../../../buildscript ${FLAGS} ${SRC2} -o ${MAINCLASS}N
 
 clean:
index 9bbd183a80b9dd96033210bb422e2c18431b0b5b..38963d9ff6ad785ebb4facbbde643397e5c55f9d 100644 (file)
@@ -1,12 +1,15 @@
 MAINCLASS=fft2d
 SRC=${MAINCLASS}.java \
        fft1d.java \
-       Matrix.java
+       Matrix.java \
+       ../../../../ClassLibrary/JavaDSM/Barrier.java
 FLAGS =-dsm -dsmcaching -prefetch -optimize -excprefetch fft2d.main -excprefetch fft2d.twiddle -excprefetch fft1d.factorize -excprefetch fft1d.printFactors -excprefetch Matrix.setValues -excprefetch Matrix.setZeros -excprefetch fft2d.transpose -trueprob 0.90 -mainclass ${MAINCLASS}
 FLAGS1=-dsm -optimize -mainclass ${MAINCLASS}
+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
 
 clean:
index 1278415552cf406decec9e343bc3cda2422416d1..e3eab9ad4a337765e7d235c34653185fdb914bb2 100644 (file)
@@ -12,6 +12,14 @@ public class Convolution extends Thread {
 
   public void run() {
 
+    int tempx0, tempy0, tempx1, tempy1;
+    atomic {
+      tempx0 = x0;
+      tempy0 = y0;
+      tempx1 = x1;
+      tempy1 = y1;  
+    }
+
     //
     //Prefetch this.img.inputImage[] the first 32 objects
     // Generates compiler error ???
@@ -21,7 +29,7 @@ public class Convolution extends Thread {
     offsets[1] = (short) 0;
     offsets[2] = getoffset{Image, inputImage};
     offsets[3] = (short) 0;
-    offsets[4] = (short) x0;
+    offsets[4] = (short) tempx0;
     offsets[5] = (short) 32;
     System.rangePrefetch(o, offsets);
 
@@ -33,7 +41,7 @@ public class Convolution extends Thread {
     offsets1[1] = (short) 0;
     offsets1[2] = getoffset{Image, outputImage};
     offsets1[3] = (short) 0;
-    offsets1[4] = (short) x0;
+    offsets1[4] = (short) tempx0;
     offsets1[5] = (short) 32;
     System.rangePrefetch(o1, offsets1);
 
index 47556830aa6149ad22e11fea98df3fe8c328971e..eb5febf3239f0cdce2f238797f417d13000d3245 100644 (file)
@@ -66,7 +66,7 @@ public class RainForest extends Thread {
     maxValue = COLUMN -1;
     int col = (rand.nextInt(Math.abs(maxValue - minValue) + 1)) + minValue;
     //
-    //Add Manual Prefetches
+    //Add Manual Prefetches for this.land[lowx][lowy] to this.land[highx][highy]
     //
     // Quickly determine the boundaries for given row and column
     int lowx = row - BLOCK;
@@ -236,7 +236,7 @@ public class RainForest extends Thread {
           if (highy >= COLUMN-1) 
             highy = COLUMN-2;
           //
-          // Add Manual Prefetch
+          // Add Manual Prefetch for land[lowx][lowy] to land[highx][highy]
           //
           Object o1 = land;
           short[] offsets1 = new short[6];
index d95d81fb258c76a44d4e3a46bf76a1d641a49762..064683cb82a0baa1d13e122e24f65d3e52e8eb5b 100644 (file)
@@ -6,6 +6,7 @@ FLAGS1=-dsm -optimize -dsmcaching -mainclass ${MAINCLASS}
 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 ${FLAGS2} -o ${MAINCLASS}NPNC200 ${SRC2}
 #      ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N200 ${SRC2}
index 597150ba5d1931b13f16280f7ddbd972cf535844..3668f47dd0bf3404074bb439d6619a1303e5725f 100644 (file)
@@ -1,17 +1,19 @@
 MAINCLASS=JGFMolDynBenchSizeB
 SRC=${MAINCLASS}.java \
-JGFInstrumentor.java \
-JGFTimer.java \
-JGFMolDynBench.java \
-DoubleWrapper.java \
-IntWrapper.java \
-MDWrap.java
+       JGFInstrumentor.java \
+       JGFTimer.java \
+       JGFMolDynBench.java \
+       DoubleWrapper.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
 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}
 
 clean:
index e67e9bf3072ae97aa48505afca107e47475bd460..91ef8f2ca7ae48141be7cebf2d6c71b408f0ed0d 100644 (file)
@@ -68,27 +68,11 @@ public class JGFMolDynBench {
   }
 
   public static void JGFapplication(JGFMolDynBench mold) { 
-    // Create new arrays 
-    //BarrierServer mybarr;
-    /*
-       int[] mid = new int[8];
-       mid[0] = (128<<24)|(195<<16)|(175<<8)|84;//dw-10
-       mid[1] = (128<<24)|(195<<16)|(175<<8)|85;//dw-11
-       mid[2] = (128<<24)|(195<<16)|(175<<8)|86;//dw-12
-       mid[3] = (128<<24)|(195<<16)|(175<<8)|87;//dw-13
-       mid[4] = (128<<24)|(195<<16)|(175<<8)|88;//dw-14
-       mid[5] = (128<<24)|(195<<16)|(175<<8)|89;//dw-15
-       mid[6] = (128<<24)|(195<<16)|(175<<8)|90;//dw-16
-       mid[7] = (128<<24)|(195<<16)|(175<<8)|91;//dw-17
-       */
-
     double sh_force [][];
     double sh_force2 [][][];
     int partsize, numthreads;
     partsize = mold.PARTSIZE;
     numthreads = mold.nthreads;
-    //mybarr = new BarrierServer(numthreads);
-    //mybarr.start(mid[0]);
 
     sh_force = new double[3][partsize];
     sh_force2 = new double[3][numthreads][partsize];
@@ -343,7 +327,6 @@ class mdRunner {
     int mdsize;
     double tmpden;
     int movemx=50;
-    //Barrier barr=new Barrier("128.195.175.84");
     particle[] one;
     int id;
     id=this.id;
@@ -375,7 +358,6 @@ class mdRunner {
 
     /* Synchronise threads and start timer before MD simulation */
 
-    //Barrier.enterBarrier(barr);
 
     /* MD simulation */
 
@@ -385,8 +367,6 @@ class mdRunner {
         one[i].domove(side,i);       
       }
 
-      /* Barrier */
-      //Barrier.enterBarrier(barr);
 
       if(id==0) {
         doinit(mdsize);
@@ -397,8 +377,6 @@ class mdRunner {
       mymd.interacts[id].i = 0;
 
 
-      /* Barrier */
-      //Barrier.enterBarrier(barr);
 
       /* compute forces */
 
@@ -406,16 +384,12 @@ class mdRunner {
         one[i].force(side,rcoff,mdsize,i,xx,yy,zz,mymd); 
       }
 
-      /* Barrier */
-      //Barrier.enterBarrier(barr);
 
       /* update force arrays */
       if(id == 0) {
         doinit2(mdsize);
       }
 
-      /* Barrier */
-      //Barrier.enterBarrier(barr);
 
       /*scale forces, update velocities */
       sum = 0.0;
@@ -459,7 +433,6 @@ class mdRunner {
         vel = vel / mdsize; 
         rp = (count / mdsize) * 100.0;
       }
-      //Barrier.enterBarrier(barr);
 
       //if (id == 0) JGFInstrumentor.stopTimer("Section3:MolDyn:Run", instr.timers);
     }