1 /* Copyright (c) 2012-2014, 2016. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 package cloud.masterworker;
9 import org.simgrid.msg.Msg;
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.MsgException;
14 public static final double TASK_COMP_SIZE = 10;
15 public static final double TASK_COMM_SIZE = 10;
16 public static final int NHOSTS = 2 ;
19 throw new IllegalAccessError("Utility class");
22 public static void main(String[] args) throws MsgException {
25 if (args.length < 1) {
26 Msg.info("Usage : Main platform_file");
27 Msg.info("Usage : Main ../platforms/platform.xml");
31 /* Construct the platform */
32 Msg.createEnvironment(args[0]);
33 Host[] hosts = Host.all();
34 if (hosts.length < NHOSTS+1) {
35 Msg.info("I need at least "+ (NHOSTS+1) +" hosts in the platform file, but " + args[0] + " contains only "
36 + hosts.length + " hosts");
39 Msg.info("Start "+ NHOSTS +" hosts");
40 new Master(hosts[0],"Master",hosts).start();
41 /* Execute the simulation */