1 /**************************************************************************
3 * Java Grande Forum Benchmark Suite - Thread Version 1.0 *
7 * Java Grande Benchmarking Project *
11 * Edinburgh Parallel Computing Centre *
13 * email: epcc-javagrande@epcc.ed.ac.uk *
16 * This version copyright (c) The University of Edinburgh, 2001. *
17 * All rights reserved. *
19 **************************************************************************/
20 public class JGFMolDynBenchSizeB {
22 public static void main(String argv[]){
24 if(argv.length != 0 ) {
25 nthreads = Integer.parseInt(argv[0]);
27 System.printString("The no of threads has not been specified, defaulting to 1\n");
28 System.printString(" " + "\n");
32 // JGFInstrumentor instr = new JGFInstrumentor();
33 // JGFInstrumentor.printHeader(3,1,nthreads);
36 mold = new JGFMolDynBench(nthreads);
38 // JGFInstrumentor.addTimer("Section3:MolDyn:Total", "Solutions",size, instr.timers);
39 // JGFInstrumentor.addTimer("Section3:MolDyn:Run", "Interactions",size, instr.timers);
41 mold.JGFsetsize(size);
43 // JGFInstrumentor.startTimer("Section3:MolDyn:Total", instr.timers);
47 JGFMolDynBench.JGFapplication(mold);
50 double[] refval = new double[2];
51 refval[0] = 1731.4306625334357;
52 refval[1] = 7397.392307839352;
55 double dev = Math.fabs(dval - refval[size]);
56 long l = (long) refval[size] *1000000;
57 long r = (long) dval * 1000000;
59 System.printString("Validation failed\n");
60 System.printString("Kinetic Energy = " + (long)dval + " " + (long)dev + " " + size + "\n");
63 // JGFInstrumentor.stopTimer("Section3:MolDyn:Total", instr.timers);
65 interactions = mold.interactions;
67 // JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Run", (double) interactions, instr.timers);
68 // JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Total", 1, instr.timers);
70 // JGFInstrumentor.printTimer("Section3:MolDyn:Run", instr.timers);
71 // JGFInstrumentor.printTimer("Section3:MolDyn:Total", instr.timers);
72 // System.printString("Finished\n");