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
# ../../../../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:
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:
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 ???
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);
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);
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;
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];
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}
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:
}
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];
int mdsize;
double tmpden;
int movemx=50;
- //Barrier barr=new Barrier("128.195.175.84");
particle[] one;
int id;
id=this.id;
/* Synchronise threads and start timer before MD simulation */
- //Barrier.enterBarrier(barr);
/* MD simulation */
one[i].domove(side,i);
}
- /* Barrier */
- //Barrier.enterBarrier(barr);
if(id==0) {
doinit(mdsize);
mymd.interacts[id].i = 0;
- /* Barrier */
- //Barrier.enterBarrier(barr);
/* compute forces */
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;
vel = vel / mdsize;
rp = (count / mdsize) * 100.0;
}
- //Barrier.enterBarrier(barr);
//if (id == 0) JGFInstrumentor.stopTimer("Section3:MolDyn:Run", instr.timers);
}