start of new file
[IRC.git] / Robust / src / Benchmarks / Prefetch / SOR / java / JGFSORBenchSizeC.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 public class JGFSORBenchSizeC{ 
22
23   public static void main(String argv[]){
24
25     int nthreads;
26     if(argv.length != 0 ) {
27       nthreads = Integer.parseInt(argv[0]);
28     } else {
29       System.out.println("The no of threads has not been specified, defaulting to 1");
30       System.out.println("  ");
31       nthreads = 1;
32     }
33
34     JGFInstrumentor instr = new JGFInstrumentor();
35     JGFInstrumentor.printHeader(2,2,nthreads);
36
37     JGFSORBench sor = new JGFSORBench(nthreads,instr); 
38
39     int size = 2;
40     JGFInstrumentor.addTimer("Section2:SOR:Kernel", "Iterations",size, instr.timers);
41
42     sor.JGFsetsize(size); 
43     sor.JGFkernel(); 
44     sor.JGFvalidate(); 
45
46     JGFInstrumentor.addOpsToTimer("Section2:SOR:Kernel", (double) (sor.JACOBI_NUM_ITER), instr.timers);
47
48     JGFInstrumentor.printTimer("Section2:SOR:Kernel", instr.timers); 
49
50   }
51 }
52
53