1 /* Copyright (c) 2012-2014. 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. */
9 import org.simgrid.msg.Host;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.MsgException;
14 * Example showing the use of the new experimental Cloud API.
17 public static final double task_comp_size = 10;
18 public static final double task_comm_size = 10;
19 public static final int hostNB = 89 ;
20 public static void main(String[] args) throws MsgException {
23 if (args.length < 1) {
24 Msg.info("Usage : Cloud platform_file");
25 Msg.info("Usage : Cloud platform.xml");
28 /* Construct the platform */
29 Msg.createEnvironment(args[0]);
30 Host[] hosts = Host.all();
31 if (hosts.length < hostNB+1) {
32 Msg.info("I need at least "+ (hostNB+1) +" hosts in the platform file, but " + args[0] + " contains only " + hosts.length + " hosts");
35 Msg.info("Start"+ hostNB +" hosts");
36 new Master(hosts[0],"Master",hosts).start();
37 /* Execute the simulation */