-#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 */
AStarPathFinder.java
FLAGS1=-dsm -optimize -mainclass ${MAINCLASS}
-FLAGS2=-dsm -dsmcaching -abortreaders -optimize -mainclass ${MAINCLASS}
-FLAGS3=-dsm -dsmcaching -prefetch -optimize -mainclass ${MAINCLASS} -excprefetch BarrierServer.updateAge -excprefetch RainForest.main -excprefetch GameMap.hasRock -excprefetch GameMap.hasTree -trueprob 0.90
+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
default:
cpp ${MAINCLASS}.java > tmp1${MAINCLASS}.java
initKernel15(kernel);
atomic {
+ int myx0=x0;
+ int myy0=y0;
+ int myx1=x1;
+ int myy1=y1;
+
double tempinput[][] = img.inputImage;
double tempout[][] = img.outputImage;
- double tinput1[] = tempinput[x0];
- double tinput2[] = tempinput[x0+1];
- double tinput3[] = tempinput[x0+2];
- double tinput4[] = tempinput[x0+3];
- double tinput5[] = tempinput[x0+4];
- double tinput6[] = tempinput[x0+5];
- double tinput7[] = tempinput[x0+6];
- double tinput8[] = tempinput[x0+7];
- double tinput9[] = tempinput[x0+8];
- double tinput10[] = tempinput[x0+9];
- double tinput11[] = tempinput[x0+10];
- double tinput12[] = tempinput[x0+11];
- double tinput13[] = tempinput[x0+12];
- double tinput14[] = tempinput[x0+13];
+ double tinput1[] = tempinput[myx0+0];
+ double tinput2[] = tempinput[myx0+1];
+ double tinput3[] = tempinput[myx0+2];
+ double tinput4[] = tempinput[myx0+3];
+ double tinput5[] = tempinput[myx0+4];
+ double tinput6[] = tempinput[myx0+5];
+ double tinput7[] = tempinput[myx0+6];
+ double tinput8[] = tempinput[myx0+7];
+ double tinput9[] = tempinput[myx0+8];
+ double tinput10[] = tempinput[myx0+9];
+ double tinput11[] = tempinput[myx0+10];
+ double tinput12[] = tempinput[myx0+11];
+ double tinput13[] = tempinput[myx0+12];
+ double tinput14[] = tempinput[myx0+13];
double tinput0[] = tinput1;
- int l=x0+14;
- for(int i=x0;i<x1;i++,l++){
+ int l=myx0+14;
+ for(int i=myx0;i<myx1;i++,l++){
double tout[] = tempout[i];
- tinput0 = tinput1; tinput1=tinput2; tinput2=tinput3; tinput3=tinput4; tinput4=tinput5;
- tinput5 = tinput6; tinput6=tinput7; tinput7=tinput8; tinput8=tinput9; tinput9=tinput10;
- tinput10 = tinput11; tinput11=tinput12; tinput12=tinput13; tinput13=tinput14; tinput14=tempinput[l];
- for(int j=y0;j<y1;++j){
+ for(int j=myy0;j<myy1;++j){
double s=0;
for(int b=0;b<kernelHeight;++b) {
s+=(tinput0[j+b] * kernel[0][b] + tinput1[j+b] * kernel[1][b] + tinput2[j+b]*kernel[2][b] +
}
tout[j]=s;
}
+ tinput0 = tinput1; tinput1=tinput2; tinput2=tinput3; tinput3=tinput4; tinput4=tinput5;
+ tinput5 = tinput6; tinput6=tinput7; tinput7=tinput8; tinput8=tinput9; tinput9=tinput10;
+ tinput10 = tinput11; tinput11=tinput12; tinput12=tinput13; tinput13=tinput14; tinput14=tempinput[l];
}
}
}
+
+
+
public static void main(String[] args) {
int SIZE = 256;
int NUM_THREADS = 1;
SRC=${MAINCLASS}.java
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}
+FLAGS =-dsm -transstats -dsmcaching -prefetch -optimize -excprefetch Image.initKernel -excprefetch Image.setValues -excprefetch Convolution.main -trueprob 0.98 -mainclass ${MAINCLASS}
FLAGS1=-dsm -optimize -mainclass ${MAINCLASS}
FLAGS2=-dsm -optimize -dsmcaching -mainclass ${MAINCLASS}
# ../../../../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 ${FLAGS2} ${SRC2} -o ${MAINCLASS}NPC
../../../../buildscript ${FLAGS} ${SRC2} -o ${MAINCLASS}N
clean:
}
public void exec() {
- int xlength=array[0].length;
- int ylength=array[0][0].length;
- long sum;
- for(int ii=0;ii<10;ii++) {
- int zz[][]=array[ii];
- for(int i=0;i<xlength;i++) {
- int a[]=zz[i];
- for(int j=0;j<ylength;j++) {
- sum+=a[j];
- }
- }
- }
+ int xlength=array[0].length;
+ int ylength=array[0][0].length;
+ //long sum;
+ for(int ii=0;ii<10;ii++) {
+ int zz[][]=array[ii];
+ /*
+ for(int i=0;i<xlength;i++) {
+ int a[]=zz[i];
+ for(int j=0;j<ylength;j++) {
+ sum+=a[j];
+ }
+ }
+ */
+ secondLoop(zz, xlength, ylength);
+ }
+ }
+
+ public void secondLoop(int[][] zz, int xlength, int ylength) {
+ long sum;
+ for(int i=0;i<xlength;i++) {
+ int a[]=zz[i];
+ for(int j=0;j<ylength;j++) {
+ sum+=a[j];
+ }
+ }
}
public void run() {
MAINCLASS=Array2D
SRC1=${MAINCLASS}.java
-FLAGS=-dsm -prefetch -transstats -dsmcaching -optimize -excprefetch Array.Array -mainclass ${MAINCLASS} -trueprob 0.98
+SRC2=ArrayEx.java
+FLAGS=-dsm -prefetch -dsmcaching -optimize -excprefetch Array2D.run -excprefetch Array2D.main -mainclass ${MAINCLASS} -trueprob 0.98
FLAGS1=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.98
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}NPNC ${SRC2}
+# ../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPC ${SRC2}
+ ../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC2}
clean:
rm -rf tmpbuilddirectory
}
JGFInstrumentor instr = new JGFInstrumentor();
- JGFInstrumentor.printHeader(2,0,nthreads);
+ //JGFInstrumentor.printHeader(2,0,nthreads);
JGFSORBench sor;
atomic {
#MAINCLASS=JGFSORBenchSizeA
#MAINCLASS=JGFSORBenchSizeC
-MAINCLASS=JGFSORBenchSizeC
+MAINCLASS1=JGFSORBenchSizeC
+MAINCLASS=JGFSORBenchSizeD
SRC=${MAINCLASS}.java \
JGFSORBench.java \
JGFInstrumentor.java \
JGFTimer.java \
SORRunner.java \
- SORWrap.java
-FLAGS=-dsm -prefetch -dsmcaching -nooptimize -debug -excprefetch JGFSORBench.JGFSORBench -excprefetch JGFSORBenchSizeA.main -excprefetch JGFSORBench.RandomMatrix -excprefetch JGFSORBench.init_sync -excprefetch JGFSORBench.JGFkernel -mainclass ${MAINCLASS} -trueprob 0.72
-FLAGS1=-dsm -dsmcaching -nooptimize -debug -mainclass ${MAINCLASS}
-FLAGS2=-dsm -optimize -mainclass ${MAINCLASS}
+ SORWrap.java \
+ ../../../../ClassLibrary/JavaDSM/Barrier.java
+SRC1=${MAINCLASS1}.java \
+ JGFSORBench.java \
+ JGFInstrumentor.java \
+ JGFTimer.java \
+ SORRunner.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}
+FLAGS2=-dsm -optimize
default:
- ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC}
- ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC}
+ ../../../../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}
clean:
rm -rf tmpbuilddirectory
public JGFSORBench(int nthreads, JGFInstrumentor instr){
this.nthreads = nthreads;
this.instr = instr;
- datasizes = new int[3];
+ datasizes = new int[4];
datasizes[0] = 1000;
datasizes[1] = 1500;
datasizes[2] = 2000;
+ datasizes[3] = 8000;
JACOBI_NUM_ITER = 100;
RANDOM_SEED = 10101010;
R = new Random(RANDOM_SEED);
JGFInstrumentor.addTimer("Section2:SOR:Kernel", "Iterations",size, instr.timers);
sor.JGFsetsize(size);
- sor.JGFkernel();
+ JGFSORBench.JGFkernel(sor,instr);
sor.JGFvalidate();
JGFInstrumentor.addOpsToTimer("Section2:SOR:Kernel", (double) (sor.JACOBI_NUM_ITER), instr.timers);
-MAINCLASS=JGFSORBenchSizeA
-SRC=${MAINCLASS}.java \
+MAINCLASS=JGFSORBenchSizeC
+MAINCLASS2=JGFSORBenchSizeD
+SRC1=${MAINCLASS}.java \
JGFInstrumentor.java \
JGFTimer.java \
JGFSORBench.java \
SORRunner.java
+SRC2=${MAINCLASS2}.java \
+JGFInstrumentor.java \
+JGFTimer.java \
+JGFSORBench.java \
+SORRunner.java
+
-FLAGS2= -thread -optimize -mainclass ${MAINCLASS} -o ${MAINCLASS}NP
+FLAGS2=-thread -optimize -mainclass ${MAINCLASS2} -o ${MAINCLASS2}
+FLAGS=-thread -optimize -mainclass ${MAINCLASS} -o ${MAINCLASS}
default:
- ../../../../buildscript ${FLAGS2} ${SRC}
+ ../../../../buildscript ${FLAGS} ${SRC1}
+ ../../../../buildscript ${FLAGS2} ${SRC2}
clean:
rm -rf tmpbuilddirectory/
#!/bin/sh
source ~/.tmpvars
+name=`cat ~/.tmpvars | cut -f2 -d"="`
+args=`cat ~/.tmpparams`
+echo $name $args >> /tmp/client_stats.txt
binpid=`ps aux | grep $bin | grep -v grep | grep -v time | awk '{print $2}'`
kill -USR1 $binpid
//Prefetch tuning paramters
//#define RETRYINTERVAL 20 //N (For Em3d, SOR, Moldyn benchmarks)
//#define SHUTDOWNINTERVAL 3 //M
-#define RETRYINTERVAL 75 //N (For MatrixMultiply, 2DFFT benchmarks)
+#define RETRYINTERVAL 20 //N (For MatrixMultiply, 2DFFT benchmarks)
#define SHUTDOWNINTERVAL 1 //M
#include <stdlib.h>