2 * Copyright (c) 2012-2013. The SimGrid Team.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package.
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.Msg;
12 import org.simgrid.msg.MsgException;
15 * Example showing the use of the new experimental Cloud API.
18 public static final double task_comp_size = 10;
19 public static final double task_comm_size = 10;
21 public static void main(String[] args) throws MsgException {
24 if (args.length < 1) {
25 Msg.info("Usage : Cloud platform_file");
26 Msg.info("Usage : Cloud platform.xml");
29 /* Construct the platform */
30 Msg.createEnvironment(args[0]);
31 /* Retrieve the 10 first hosts of the platform file */
32 Host[] hosts = Host.all();
33 if (hosts.length < 10) {
34 Msg.info("I need at least 10 hosts in the platform file, but " + args[0] + " contains only " + hosts.length + " hosts");
37 new Master(hosts[0],"Master",hosts).start();
38 /* Execute the simulation */