1 /**************************************************************************
2 * * Java Grande Forum Benchmark Suite - Version 2.0 * * produced by * * Java
3 * Grande Benchmarking Project * * at * * Edinburgh Parallel Computing Centre *
4 * * email: epcc-javagrande@epcc.ed.ac.uk * * * This version copyright (c) The
5 * University of Edinburgh, 1999. * All rights reserved. * *
6 **************************************************************************/
8 public class JGFMonteCarloBench extends CallAppDemo {
10 public JGFMonteCarloBench(){
14 public void JGFsetsize(int size) {
18 public void JGFinitialise(int workload) {
24 public void JGFapplication() {
30 public void JGFvalidate() {
31 double refval[] = new double[2];
32 refval[0] = -0.0333976656762814;
33 refval[1] = -0.03215796752868655;
35 double dev = Math.abs(getAppDemo().JGFavgExpectedReturnRateMC - refval[size]);
37 System.out.println("Validation failed");
38 System.out.println(" expectedReturnRate= " + getAppDemo().JGFavgExpectedReturnRateMC + " " + dev
41 System.out.println("Validation success");
45 public void JGFrun(int size,int workload) {
48 JGFinitialise(workload);
54 public static void main(String argv[]) {
56 JGFMonteCarloBench mc = new JGFMonteCarloBench();
60 size=Integer.parseInt(argv[0]);
63 workload=Integer.parseInt(argv[1]);
65 mc.JGFrun(size,workload);