accidental update
[IRC.git] / Robust / src / Benchmarks / oooJava / sor / JGFSORBenchSizeD.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 JGFSORBenchSizeD{ 
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.printString("The no of threads has not been specified, defaulting to 1\n");
30       System.printString("  \n");
31       nthreads = 1;
32     }
33
34     JGFInstrumentor instr = new JGFInstrumentor();
35     //JGFInstrumentor.printHeader(2,0,nthreads);
36
37     JGFSORBench sor;
38     sor = new JGFSORBench(nthreads); 
39
40     int size = 3;
41     JGFInstrumentor.addTimer("Section2:SOR:Kernel", "Iterations",size, instr.timers);
42
43     sor.JGFsetsize(size); 
44     JGFSORBench.JGFkernel(sor); 
45     int retval = 0;
46     /*
47        retval = sor.JGFvalidate(); 
48     */
49     if(retval!=0) {
50       System.printString("Validation failed\n");
51     }
52
53     int jacobi;
54     jacobi = sor.JACOBI_NUM_ITER;
55
56     JGFInstrumentor.addOpsToTimer("Section2:SOR:Kernel", (double) (sor.JACOBI_NUM_ITER), instr.timers);
57
58     JGFInstrumentor.printTimer("Section2:SOR:Kernel", instr.timers); 
59
60     System.printString("Finished\n");
61   }
62 }