1 /* Copyright (c) 2012-2021. 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;
14 public static final double TASK_COMP_SIZE = 10;
15 public static final double TASK_COMM_SIZE = 10;
16 public static final int NHOSTS = 6;
17 public static final int NSTEPS = 50;
20 throw new IllegalAccessError("Utility class");
23 public static void main(String[] args) {
26 String platfFile = "../../examples/platforms/small_platform.xml";
30 File f = new File(platfFile);
32 Msg.error("File " + platfFile + " does not exist in " + System.getProperty("user.dir"));
33 Msg.error("Usage : Main ../platforms/platform.xml");
36 Msg.createEnvironment(platfFile);
37 Host[] hosts = Host.all();
38 if (hosts.length < NHOSTS+1) {
39 Msg.info("I need at least "+ (NHOSTS+1) +" hosts in the platform file, but " + args[0] + " contains only "
40 + hosts.length + " hosts");
43 new Master(hosts[0],"Master",hosts).start();
45 /* Execute the simulation */