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;
20 public static final int hostNB = 89 ;
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 Host[] hosts = Host.all();
32 if (hosts.length < hostNB+1) {
33 Msg.info("I need at least "+ (hostNB+1) +" hosts in the platform file, but " + args[0] + " contains only " + hosts.length + " hosts");
36 Msg.info("Start"+ hostNB +" hosts");
37 new Master(hosts[0],"Master",hosts).start();
38 /* Execute the simulation */