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