Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / examples / deprecated / java / app / masterworker / Main.java
1 /* Copyright (c) 2006-2021. 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 app.masterworker;
8
9 import java.io.File;
10
11 import org.simgrid.msg.Msg;
12
13 class Main {
14   public static final int TASK_COMP_SIZE = 10000000;
15   public static final int TASK_COMM_SIZE = 10000000;
16   private Main() {
17     throw new IllegalAccessError("Utility class");
18   }
19
20   public static void main(String[] args) {
21     /* initialize the MSG simulation. Must be done before anything else (even logging). */
22     Msg.init(args);
23
24     String platf  = args.length > 1 ? args[0] : "../platforms/small_platform.xml";
25     String deploy =  args.length > 1 ? args[1] : "app/masterworker/masterworker.xml";
26
27     Msg.verb("Platform: "+platf+"; Deployment:"+deploy+"; Current directory: "+new File(".").getAbsolutePath());
28
29     /* construct the platform and deploy the application */
30     Msg.createEnvironment(platf);
31     Msg.deployApplication(deploy);
32     /*  execute the simulation. */
33     Msg.run();
34   }
35 }