Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Stuks When a process ( Slave ) Tries to Recieve a Task...
[simgrid.git] / src / bindings / ruby / MasterSlave.rb
index 1040e42..307f865 100644 (file)
@@ -1,11 +1,20 @@
 require 'msg'
 require 'RubyProcess'
-
 require 'Master'
 require 'Slave'
 
-Msg.init()
-Msg.createEnvironment("../../../examples/msg/msg_platform.xml")
-Msg.deployApplication("MasterSlave_deploy.xml")
-Msg.run()
-Msg.exit()
+# include MSG
+
+raise "Bad Number Of Arguments" if ARGV.length != 2 
+
+MSG.init(ARGV)
+# Thread.list.each {|t| p t}
+raise "Bad Number Of Arguments" if (ARGV.length < 2)
+MSG.createEnvironment(ARGV[0])
+# Thread.list.each {|t| p t}
+MSG.deployApplication(ARGV[1])
+# Thread.list.each {|t| p t}
+MSG.run()
+# Thread.list.each {|t| p t}
+MSG.getClock()
+# exit()