Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
(kinda) working java wrappers by Malek and me
[simgrid.git] / examples / java / suspend / SuspendTest.java
1 /*
2  * $Id$
3  *
4  * Copyright 2006,2007 Martin Quinson, Malek Cherier         
5  * All rights reserved. 
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. 
9  */
10
11
12 import simgrid.msg.*;
13
14 public class SuspendTest {
15     
16     public static void main(String[] args) throws JniException, NativeException {
17         
18         /* initialize the MSG simulation. Must be done before anything else (even logging). */
19         Msg.init(args);
20
21         if(args.length < 2) {
22                 
23                 Msg.info("Usage   : Suspend platform_file deployment_file");
24                 Msg.info("example : Suspend msg_test_suspend_platform.xml msg_test_suspend_deployment.xml");
25                 System.exit(1);
26         }
27         
28         /* specify the number of channel for the process of the simulation. */
29         Channel.setNumber(1);
30         /* specify a paje output file. */
31         Msg.pajeOutput("suspend.trace");
32                 
33         /* construct the platform and deploy the application */
34         Msg.createEnvironment(args[0]);
35         Msg.deployApplication(args[1]);
36                 
37         /*  execute the simulation. */
38         Msg.run();
39     }
40 }