Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into fix/execute_benched
[simgrid.git] / examples / java / energy / pstate / Main.java
1 /* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
2
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. */
5
6 package energy.pstate;
7
8 import org.simgrid.msg.Host;
9 import org.simgrid.msg.Msg;
10
11 class Main {
12   private Main() {
13     throw new IllegalAccessError("Utility class");
14   }
15
16   public static void main(String[] args) {
17     Msg.energyInit();
18     Msg.init(args);
19
20     if (args.length < 1) {
21       Msg.info("Usage: Main ../platforms/energy_platform_file.xml");
22       System.exit(1);
23     }
24
25     /* construct the platform */
26     Msg.createEnvironment(args[0]);
27
28     /* Create and start a runner for the experiment */
29     new PstateRunner(Host.all()[0],"pstate runner",null).start();
30
31     Msg.run();
32   }
33 }