Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
receiving line command arguments
authorcoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 13 Apr 2010 14:42:54 +0000 (14:42 +0000)
committercoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 13 Apr 2010 14:42:54 +0000 (14:42 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7550 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/lua/master_slave.lua

index 883574f..fd4ff4f 100644 (file)
@@ -67,8 +67,13 @@ end -- function ----------------------------------------------------------
 --]]
 
 require "simgrid"
 --]]
 
 require "simgrid"
+if (#arg == 2) then
+simgrid.platform(arg[1])
+simgrid.application(arg[2])
+else
 simgrid.platform("../msg/small_platform.xml")
 simgrid.application("../ruby/deploy.xml")
 simgrid.platform("../msg/small_platform.xml")
 simgrid.application("../ruby/deploy.xml")
+end
 simgrid.run()
 simgrid.info("Simulation's over.See you.")
 simgrid.clean()
 simgrid.run()
 simgrid.info("Simulation's over.See you.")
 simgrid.clean()