\section bindings_binding_lua Lua Binding
Most of Simgrid modules require a good level in C programming, since simgrid is used to be as standard C library.
- Sometime users prefer using some kind of « easy scripts » or a language easier to code with, for their works,
+ Sometime users prefer using some kind of “easy scripts” or a language easier to code with, for their works,
which avoid dealing with C errors, and sometime an important gain of time.
Besides Java Binding, Lua and Ruby bindings are available since version 3.4 of Simgrid
for MSG Module, and we are currenlty working on bindings for other modules.
- loading the platforme/deployment XML file that describe the environment of simulation
- and … Running the Simulation.
-\dontinclude lua/masterslave/master.lua
+\don'tinclude lua/masterslave/master.lua
\subsection bindings_binding_lua_example_master_slave Master/Slave Example
\li Master Code
then simgrid.Task.send(task,alias) to send it.
we use also simgrid.Task.name(task), to get the task's name.
-\dontinclude lua/masterslave/slave.lua
+\don'tinclude lua/masterslave/slave.lua
\li Slave Code
\until end_of_slave
Here, we see the use of simgrid.Task.recv(alias) to receive a task with a specific alias,
this function return directly the task recevied.
-\dontinclude lua/masterslave/master_slave.lua
+\don'tinclude lua/masterslave/master_slave.lua
\li Set Environmenet and run application
\until simgrid.clean()
\verbatim
simgrid.register_application();
\endverbatim
-Yes, Here too you have to resgiter your application before running the simulation.
+Yes, Here too you have to register your application before running the simulation.
the full example is distributed in the file examples/lua/master_slave_bypass.lua
- */
\ No newline at end of file
+ */