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;
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.Host;
10 import org.simgrid.msg.MsgException;
13 public static final double TASK_COMP_SIZE = 10;
14 public static final double TASK_COMM_SIZE = 10;
15 public static final int NHOSTS = 6;
18 throw new IllegalAccessError("Utility class");
21 public static void main(String[] args) throws MsgException {
24 if (args.length < 1) {
25 Msg.info("Usage : Main platform_file");
26 Msg.info("Usage : Main ../platforms/platform.xml");
30 /* Construct the platform */
31 Msg.createEnvironment(args[0]);
32 Host[] hosts = Host.all();
33 if (hosts.length < NHOSTS+1) {
34 Msg.info("I need at least "+ (NHOSTS+1) +" hosts in the platform file, but " + args[0] + " contains only "
35 + hosts.length + " hosts");
38 new Master(hosts[0],"Master",hosts).start();
40 /* Execute the simulation */