start of new file
[IRC.git] / Robust / src / Benchmarks / Prefetch / SOR / java / JGFSORBenchSizeA.java
1 /**************************************************************************
2 *                                                                         *
3 *         Java Grande Forum Benchmark Suite - Thread Version 1.0          *
4 *                                                                         *
5 *                            produced by                                  *
6 *                                                                         *
7 *                  Java Grande Benchmarking Project                       *
8 *                                                                         *
9 *                                at                                       *
10 *                                                                         *
11 *                Edinburgh Parallel Computing Centre                      *
12 *                                                                         * 
13 *                email: epcc-javagrande@epcc.ed.ac.uk                     *
14 *                                                                         *
15 *                                                                         *
16 *      This version copyright (c) The University of Edinburgh, 2001.      *
17 *                         All rights reserved.                            *
18 *                                                                         *
19 **************************************************************************/
20
21
22 public class JGFSORBenchSizeA{ 
23
24   public static void main(String argv[]){
25
26     int nthreads;
27
28     if(argv.length != 0 ) {
29       nthreads = Integer.parseInt(argv[0]);
30     } else {
31       System.out.println("The no of threads has not been specified, defaulting to 1");
32       System.out.println("  ");
33       nthreads = 1;
34     }
35
36     JGFInstrumentor instr = new JGFInstrumentor();
37     JGFInstrumentor.printHeader(2,0,nthreads);
38
39     JGFSORBench sor = new JGFSORBench(nthreads,instr); 
40
41     int size = 0;
42     JGFInstrumentor.addTimer("Section2:SOR:Kernel", "Iterations",size, instr.timers);
43
44     sor.JGFsetsize(size); 
45     JGFSORBench.JGFkernel(sor,instr); 
46     sor.JGFvalidate(); 
47
48     JGFInstrumentor.addOpsToTimer("Section2:SOR:Kernel", (double) (sor.JACOBI_NUM_ITER), instr.timers);
49
50     JGFInstrumentor.printTimer("Section2:SOR:Kernel", instr.timers); 
51
52   }
53 }
54