1 -- Copyright (c) 2011-2012, 2014. The SimGrid Team.
2 -- All rights reserved.
4 -- This program is free software; you can redistribute it and/or modify it
5 -- under the terms of the license (GNU LGPL) which comes with this package.
10 error("Wrong number of arguments (got " .. #arg .. ", expected 1: slave_id)")
13 local my_mailbox = "slave " .. arg[1]
14 simgrid.info("Hello from lua, I'm a poor slave with mailbox: " .. my_mailbox)
18 local task = simgrid.task.recv(my_mailbox)
19 local task_name = task:get_name()
20 if (task_name == "finalize") then
21 simgrid.info("Got finalize message")
24 simgrid.info("Received task '" .. task_name .. "' on mailbox '" .. my_mailbox .. "'")
26 simgrid.info("Task '" .. task_name .. "' is done")
29 simgrid.info("I'm done. See you!")