add new files for building equivalent java single version for size JGFSORBenchSizeD
authoradash <adash>
Mon, 7 Dec 2009 20:26:05 +0000 (20:26 +0000)
committeradash <adash>
Mon, 7 Dec 2009 20:26:05 +0000 (20:26 +0000)
Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBenchSizeD.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/SOR/javasingle/SORWrap.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile

diff --git a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBenchSizeD.java b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBenchSizeD.java
new file mode 100644 (file)
index 0000000..bd1ce69
--- /dev/null
@@ -0,0 +1,62 @@
+/**************************************************************************
+*                                                                         *
+*         Java Grande Forum Benchmark Suite - Thread Version 1.0          *
+*                                                                         *
+*                            produced by                                  *
+*                                                                         *
+*                  Java Grande Benchmarking Project                       *
+*                                                                         *
+*                                at                                       *
+*                                                                         *
+*                Edinburgh Parallel Computing Centre                      *
+*                                                                         * 
+*                email: epcc-javagrande@epcc.ed.ac.uk                     *
+*                                                                         *
+*                                                                         *
+*      This version copyright (c) The University of Edinburgh, 2001.      *
+*                         All rights reserved.                            *
+*                                                                         *
+**************************************************************************/
+
+public class JGFSORBenchSizeD{ 
+
+  public static void main(String argv[]){
+
+    int nthreads;
+    if(argv.length != 0 ) {
+      nthreads = Integer.parseInt(argv[0]);
+    } else {
+      System.printString("The no of threads has not been specified, defaulting to 1\n");
+      System.printString("  \n");
+      nthreads = 1;
+    }
+
+    JGFInstrumentor instr = new JGFInstrumentor();
+    //JGFInstrumentor.printHeader(2,0,nthreads);
+
+    JGFSORBench sor;
+    sor = new JGFSORBench(nthreads); 
+
+    int size = 3;
+    JGFInstrumentor.addTimer("Section2:SOR:Kernel", "Iterations",size, instr.timers);
+
+    sor.JGFsetsize(size); 
+    JGFSORBench.JGFkernel(sor); 
+    int retval = 0;
+    /*
+       retval = sor.JGFvalidate(); 
+    */
+    if(retval!=0) {
+      System.printString("Validation failed\n");
+    }
+
+    int jacobi;
+    jacobi = sor.JACOBI_NUM_ITER;
+
+    JGFInstrumentor.addOpsToTimer("Section2:SOR:Kernel", (double) (sor.JACOBI_NUM_ITER), instr.timers);
+
+    JGFInstrumentor.printTimer("Section2:SOR:Kernel", instr.timers); 
+
+    System.printString("Finished\n");
+  }
+}
diff --git a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/SORWrap.java b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/SORWrap.java
new file mode 100644 (file)
index 0000000..680657f
--- /dev/null
@@ -0,0 +1,9 @@
+public class SORWrap {
+    public SORRunner sor;
+    public SORWrap() {
+    }
+
+    public SORWrap(SORRunner e) {
+       sor=e;
+    }
+}
index 338da540ac6101f2098bf2669a4eeaa62bf3827b..7df86ee1e7fc44014bdb618853a11a0d496d393d 100644 (file)
@@ -9,7 +9,8 @@ SRC2=${MAINCLASS2}.java \
 JGFInstrumentor.java \
 JGFTimer.java \
 JGFSORBench.java \
-SORRunner.java
+SORRunner.java \
+SORWrap.java
 
 
 FLAGS2=-thread -optimize -mainclass ${MAINCLASS2} -o ${MAINCLASS2}