From a6562e0ffdbe4cb34f2b4af729c217412b55fdd3 Mon Sep 17 00:00:00 2001 From: adash Date: Mon, 16 Mar 2009 08:36:35 +0000 Subject: [PATCH] most recent versions --- .../Benchmarks/Prefetch/2DFFT/dsm/fft2d.java | 41 +++++++------ .../src/Benchmarks/Prefetch/Array/Array.java | 61 +++++++++++-------- Robust/src/Benchmarks/Prefetch/Array/makefile | 7 +-- .../src/Benchmarks/Prefetch/Chase/Chase.java | 28 ++------- Robust/src/Benchmarks/Prefetch/Chase/makefile | 8 +-- .../ManualPrefetch/Moldyn/JGFMolDynBench.java | 19 ++++-- 6 files changed, 81 insertions(+), 83 deletions(-) diff --git a/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/fft2d.java b/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/fft2d.java index 27bab7e6..dd6a7116 100644 --- a/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/fft2d.java +++ b/Robust/src/Benchmarks/Prefetch/2DFFT/dsm/fft2d.java @@ -9,13 +9,12 @@ public class fft2d extends Thread { // // Code borrowed from :Java Digital Signal Processing book by Lyon and Rao - public Matrix data1, data2; + public Matrix data1; public int x0, x1; // Constructor: 2-d FFT of Complex data. - public fft2d(Matrix data1, Matrix data2, int x0, int x1) { + public fft2d(Matrix data1, int x0, int x1) { this.data1 = data1; - this.data2 = data2; this.x0 = x0; this.x1 = x1; } @@ -39,9 +38,10 @@ public class fft2d extends Thread { end = x1; fft1 = new fft1d(columnlength); fft2 = new fft1d(rowlength); - for (int i = x0; i < x1; i++) { + int l=8; + for (int i = x0; i < x1; i++,l++) { //input of FFT - double inputRe[] = tempdataRe[i]; //local array + double inputRe[] = tempdataRe[i]; //local array double inputIm[] = tempdataIm[i]; fft(fft1, inputRe, inputIm); } //end of for @@ -53,7 +53,7 @@ public class fft2d extends Thread { // Tranpose data. if (start == 0) { atomic { - transpose(tempdataRe,tempdataIm, data2.dataRe,data2.dataIm, rowlength, columnlength); + transpose(tempdataRe, tempdataIm, rowlength, columnlength); } } @@ -64,9 +64,10 @@ public class fft2d extends Thread { double transtempRe[][]; double transtempIm[][]; atomic { - transtempRe = data2.dataRe; - transtempIm = data2.dataIm; - for (int j = start; j < end; j++) { + transtempRe = data1.dataRe; + transtempIm = data1.dataIm; + int l=8; + for (int j = start; j < end; j++,l++) { //input of FFT double inputRe[] = transtempRe[j]; //local array double inputIm[] = transtempIm[j]; @@ -75,14 +76,19 @@ public class fft2d extends Thread { } } //end of run - public void transpose(double[][] tempdataRe, double[][] tempdataIm, double[][] outputRe, - double[][] outputIm, int rowlength, int columnlength) { + public void transpose(double[][] tempdataRe, double[][] tempdataIm, int rowlength, int columnlength) { for(int i = 0; i0) + numTraverse=Integer.parseInt(argv[0]); + atomic { - System.println("Starting transaction\n"); Foo fold=global new Foo(); for(int i=0;i>>>>>> 1.6 b=b.next; -<<<<<<< Chase.java - i++; -======= i++; - if((i&127) == 0) - ; ->>>>>>> 1.6 } -<<<<<<< Chase.java - } - } -======= } ->>>>>>> 1.6 } } diff --git a/Robust/src/Benchmarks/Prefetch/Chase/makefile b/Robust/src/Benchmarks/Prefetch/Chase/makefile index 86fb4223..fb0146bd 100644 --- a/Robust/src/Benchmarks/Prefetch/Chase/makefile +++ b/Robust/src/Benchmarks/Prefetch/Chase/makefile @@ -1,13 +1,13 @@ MAINCLASS=Chase SRC1=${MAINCLASS}.java -#FLAGS=-dsm -prefetch -dsmcaching -optimize -excprefetch Chase.main -excprefetch Chase.Chase -mainclass ${MAINCLASS} -trueprob 0.7 -FLAGS2=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.7 -FLAGS3=-dsm -optimize -mainclass ${MAINCLASS} -trueprob 0.7 +#FLAGS=-dsm -prefetch -dsmcaching -optimize -excprefetch Chase.main -excprefetch Chase.Chase -mainclass ${MAINCLASS} -trueprob 0.98 +FLAGS2=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.99 +FLAGS3=-dsm -optimize -mainclass ${MAINCLASS} -trueprob 0.99 #for testing no java option #FLAGS=-dsm -prefetch -optimize -debug -excprefetch Chase.main -excprefetch Chase.Chase -mainclass ${MAINCLASS} -trueprob 0.99 -nojava default: ../../../buildscript ${FLAGS3} -o ${MAINCLASS}NPNC ${SRC1} - ../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1} + ../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPC ${SRC1} clean: rm -rf tmpbuilddirectory diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Moldyn/JGFMolDynBench.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Moldyn/JGFMolDynBench.java index 9f88f521..b74a7602 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Moldyn/JGFMolDynBench.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Moldyn/JGFMolDynBench.java @@ -384,6 +384,17 @@ class mdRunner extends Thread { offsets1[3] = (short) 0; System.rangePrefetch(o1, offsets1); + /* + offsets1[0] = getoffset{mdRunner, sh_force}; + offsets1[1] = (short) 0; + offsets1[2] = (short) 0; + offsets1[3] = (short) 2; + System.rangePrefetch(this, offsets1); + + offsets1[0] = getoffset{mdRunner, sh_force2}; + offsets1[1] = (short) 0; + System.rangePrefetch(this, offsets1); + */ ///////////////////// mdsize = mymd.PARTSIZE; @@ -423,13 +434,11 @@ class mdRunner extends Thread { //PREFETCH: sh_force[0..2][0..mdsize] atomic { /* - short[] offsets1 = new short[6]; + short[] offsets1 = new short[4]; offsets1[0] = getoffset{mdRunner, sh_force}; offsets1[1] = (short) 0; offsets1[2] = (short) 0; offsets1[3] = (short) 2; - offsets1[4] = (short) 0; - offsets1[5] = (short) (mdsize -1); System.rangePrefetch(this, offsets1); */ /* move the particles and update velocities */ @@ -490,11 +499,9 @@ class mdRunner extends Thread { atomic { /* Object o = this.sh_force; - short[] offsets1 = new short[4]; + short[] offsets1 = new short[2]; offsets1[0] = (short) 0; offsets1[1] = (short) 2; - offsets1[2] = (short) 0; - offsets1[3] = (short) (mdsize -1); System.rangePrefetch(o, offsets1); */ -- 2.34.1