Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move MSG and SimDag examples out of the sight of users
[simgrid.git] / examples / deprecated / java / app / bittorrent / Main.java
1 /* Copyright (c) 2012-2019. 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 app.bittorrent;
7
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.RngStream;
10
11 class Main{
12   private Main() {
13     throw new IllegalAccessError("Utility class");
14   }
15
16   public static void main(String[] args) {
17     int[] seed = { 12345, 12345, 12345, 12345, 12345, 12345 };
18     RngStream.setPackageSeed(seed);
19
20     Msg.init(args);
21     if(args.length < 2) {
22       Msg.info("Usage   : Bittorrent platform_file deployment_file");
23       Msg.info("example : Bittorrent ../platforms/cluster_backbone.xml bittorrent.xml");
24       System.exit(1);
25     }
26
27     /* construct the platform and deploy the application */
28     Msg.createEnvironment(args[0]);
29     Msg.deployApplication(args[1]);
30
31     /*  execute the simulation. */
32     Msg.run();
33   }
34 }