From ca1eca72bdef4608986408afdd993471c5996801 Mon Sep 17 00:00:00 2001 From: adash Date: Mon, 7 Dec 2009 20:26:05 +0000 Subject: [PATCH] add new files for building equivalent java single version for size JGFSORBenchSizeD --- .../SOR/javasingle/JGFSORBenchSizeD.java | 62 +++++++++++++++++++ .../Prefetch/SOR/javasingle/SORWrap.java | 9 +++ .../Prefetch/SOR/javasingle/makefile | 3 +- 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBenchSizeD.java create mode 100644 Robust/src/Benchmarks/Prefetch/SOR/javasingle/SORWrap.java diff --git a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBenchSizeD.java b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBenchSizeD.java new file mode 100644 index 00000000..bd1ce691 --- /dev/null +++ b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/JGFSORBenchSizeD.java @@ -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 index 00000000..680657f7 --- /dev/null +++ b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/SORWrap.java @@ -0,0 +1,9 @@ +public class SORWrap { + public SORRunner sor; + public SORWrap() { + } + + public SORWrap(SORRunner e) { + sor=e; + } +} diff --git a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile index 338da540..7df86ee1 100644 --- a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile +++ b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile @@ -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} -- 2.34.1