Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix smpi_execute_benched.
[simgrid.git] / examples / java / io / file / Main.java
1 /* Copyright (c) 2012-2014. 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 io.file;
8
9 import org.simgrid.msg.Msg;
10 import org.simgrid.msg.Host;
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.init(args);
20     if(args.length < 1) {
21       Msg.info("Usage   : IO platform_file ");
22       Msg.info("example : IO ../platforms/storage/storage.xml ");
23       System.exit(1);
24     }
25
26     Msg.createEnvironment(args[0]);
27
28     Host[] hosts = Host.all();
29
30     Msg.info("Number of hosts:" + hosts.length);
31     for (int i = 0; i < hosts.length && i < 4; i++) {
32       new io.file.Node(hosts[i],i).start();
33     }
34
35     Msg.run();
36   }
37 }