Add new benchmark...still have compile errors
[IRC.git] / Robust / src / Benchmarks / Prefetch / Moldyn / java / JGFMolDynBenchSizeA.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 import java.io.*;
21 import java.util.*;
22
23 public class JGFMolDynBenchSizeA { 
24
25     public static void main(String argv[]){
26     int nthreads;
27     if(argv.length != 0 ) {
28       nthreads = Integer.parseInt(argv[0]);
29     } else {
30       System.out.println("The no of threads has not been specified, defaulting to 1");
31       System.out.println("  ");
32       nthreads = 1;
33     }
34
35     JGFInstrumentor instr = new JGFInstrumentor();
36     JGFInstrumentor.printHeader(3,0,nthreads);
37
38     JGFMolDynBench mold = new JGFMolDynBench(nthreads, instr); 
39     int size = 0;
40     JGFInstrumentor.addTimer("Section3:MolDyn:Total", "Solutions",size, instr.timers);
41     JGFInstrumentor.addTimer("Section3:MolDyn:Run", "Interactions",size, instr.timers);
42
43     mold.JGFsetsize(size); 
44
45     JGFInstrumentor.startTimer("Section3:MolDyn:Total", instr.timers);
46
47     mold.JGFinitialise(); 
48     mold.JGFapplication(); 
49     mold.JGFvalidate(); 
50
51     JGFInstrumentor.stopTimer("Section3:MolDyn:Total", instr.timers);
52
53     JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Run", (double) (mold.interactions), instr.timers);
54     JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Total", 1, instr.timers);
55
56     JGFInstrumentor.printTimer("Section3:MolDyn:Run", instr.timers); 
57     JGFInstrumentor.printTimer("Section3:MolDyn:Total", instr.timers); 
58   }
59 }
60