Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename SG_java -> simgrid-java.
[simgrid.git] / examples / scala / master_slave_bypass / MsBypass.scala
1 /*
2  * Copyright (c) 2006-2013. The SimGrid Team.
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. 
7  */
8
9 package master_slave_bypass
10
11 import org.simgrid.msg.Msg
12 import org.simgrid.msg.MsgException
13 import org.simgrid.msg.NativeException
14
15 object MsBypass extends App {
16  /* This only contains the launcher. If you do nothing more than than you can run 
17   *   scala simgrid.msg.Msg
18   * which also contains such a launcher
19   */
20   
21   /* initialize the MSG simulation. Must be done before anything else (even logging). */
22   Msg.init(args)
23   Msg.createEnvironment(args(0))
24
25   /* bypass deployment */
26   try {
27     new Master("bob","process1").start()
28   }
29   catch {
30     case e:MsgException => println("Create processes failed!")
31   }
32     
33   /*  execute the simulation. */
34   Msg.run()
35 }