Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:simgrid/simgrid
[simgrid.git] / examples / java / hostload / Main.java
1 /* Copyright (c) 2012-2018. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 package hostload;
8
9 import org.simgrid.msg.Host;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.MsgException;
12
13 public class Main {
14   private Main() {
15     throw new IllegalAccessError("Utility class");
16   }
17
18   public static void main(String[] args) throws MsgException {
19     Msg.loadInit();
20     Msg.init(args); 
21
22     if (args.length < 1) {
23       Msg.info("Usage   : Load platform_file");
24       Msg.info("Usage  : Load ../platforms/small_platform.xml");
25       System.exit(1);
26     }
27     /* Construct the platform */
28     Msg.createEnvironment(args[0]);
29     new LoadRunner(Host.all()[0], "").start();
30
31     Msg.run();
32
33   }
34 }