From: adash Date: Tue, 10 Mar 2009 01:13:03 +0000 (+0000) Subject: bug fix for lookupservice java version( now works fine for 8 threads) X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=54575906c6d317a6c8723d5871a24515d6f5512f;p=IRC.git bug fix for lookupservice java version( now works fine for 8 threads) change makefiles get rid of print statements --- diff --git a/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile b/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile index deccf978..2fbab3e0 100644 --- a/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile +++ b/Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile @@ -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: diff --git a/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile b/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile index 9bbd183a..38963d9f 100644 --- a/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile +++ b/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/Makefile @@ -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: diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/2DConv/ConvolutionSizeC.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/2DConv/ConvolutionSizeC.java index 12784155..e3eab9ad 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/2DConv/ConvolutionSizeC.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/2DConv/ConvolutionSizeC.java @@ -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); diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/RainForest/RainForest.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/RainForest/RainForest.java index 47556830..eb5febf3 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/RainForest/RainForest.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/RainForest/RainForest.java @@ -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]; diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile index d95d81fb..064683cb 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile @@ -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} diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile index 597150ba..3668f47d 100644 --- a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile @@ -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: diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBench.java b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBench.java index e67e9bf3..91ef8f2c 100644 --- a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBench.java +++ b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBench.java @@ -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); }