1 /* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 package cloud.masterworker;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.Host;
12 import org.simgrid.msg.MsgException;
15 public static final double TASK_COMP_SIZE = 10;
16 public static final double TASK_COMM_SIZE = 10;
17 public static final int NHOSTS = 6;
18 public static final int NSTEPS = 50;
21 throw new IllegalAccessError("Utility class");
24 public static void main(String[] args) throws MsgException {
27 String platfFile = "../../examples/platforms/small_platform.xml";
31 File f = new File(platfFile);
33 System.err.println("File "+platfFile+" does not exist in "+System.getProperty("user.dir"));
34 System.err.println("Usage : Main ../platforms/platform.xml");
37 Msg.createEnvironment(platfFile);
38 Host[] hosts = Host.all();
39 if (hosts.length < NHOSTS+1) {
40 Msg.info("I need at least "+ (NHOSTS+1) +" hosts in the platform file, but " + args[0] + " contains only "
41 + hosts.length + " hosts");
44 new Master(hosts[0],"Master",hosts).start();
46 /* Execute the simulation */