# compile the master_slave example

# Later modify the commande and specify the platform and deployment path

$ lua master_slave.lua ../../msg/small_platform.xml ../deploy.xml
> [Tremblay:Master:(1) 0.000000] [lua/INFO] Hello from lua, I'm the master
> [Tremblay:Master:(1) 0.000000] [lua/INFO] Sending  'Task 1' to 'slave 1'
> [Bourassa:Slave:(2) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 0
> [Jupiter:Slave:(3) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 1
> [Fafard:Slave:(4) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 2
> [Ginette:Slave:(5) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 3
> [Jupiter:Slave:(3) 0.169155] [lua/INFO] Received task 'Task 1' on mailbox 'slave 1'
> [Tremblay:Master:(1) 0.169155] [lua/INFO] Done sending 'Task 1' to 'slave 1'
> [Tremblay:Master:(1) 0.169155] [lua/INFO] Sending  'Task 2' to 'slave 2'
> [Fafard:Slave:(4) 0.327551] [lua/INFO] Received task 'Task 2' on mailbox 'slave 2'
> [Tremblay:Master:(1) 0.327551] [lua/INFO] Done sending 'Task 2' to 'slave 2'
> [Tremblay:Master:(1) 0.327551] [lua/INFO] Sending  'Task 3' to 'slave 3'
> [Ginette:Slave:(5) 0.451283] [lua/INFO] Received task 'Task 3' on mailbox 'slave 3'
> [Tremblay:Master:(1) 0.451283] [lua/INFO] Done sending 'Task 3' to 'slave 3'
> [Tremblay:Master:(1) 0.451283] [lua/INFO] Sending  'Task 4' to 'slave 0'
> [Bourassa:Slave:(2) 0.583902] [lua/INFO] Received task 'Task 4' on mailbox 'slave 0'
> [Tremblay:Master:(1) 0.583902] [lua/INFO] Done sending 'Task 4' to 'slave 0'
> [Tremblay:Master:(1) 0.583902] [lua/INFO] Sending  'Task 5' to 'slave 1'
> [Jupiter:Slave:(3) 0.824497] [lua/INFO] Task 'Task 1' is done
> [Fafard:Slave:(4) 0.982894] [lua/INFO] Task 'Task 2' is done
> [Tremblay:Master:(1) 0.993652] [lua/INFO] Done sending 'Task 5' to 'slave 1'
> [Tremblay:Master:(1) 0.993652] [lua/INFO] Sending  'Task 6' to 'slave 2'
> [Jupiter:Slave:(3) 0.993652] [lua/INFO] Received task 'Task 5' on mailbox 'slave 1'
> [Fafard:Slave:(4) 1.152048] [lua/INFO] Received task 'Task 6' on mailbox 'slave 2'
> [Tremblay:Master:(1) 1.152048] [lua/INFO] Done sending 'Task 6' to 'slave 2'
> [Tremblay:Master:(1) 1.152048] [lua/INFO] Sending  'Task 7' to 'slave 3'
> [Ginette:Slave:(5) 1.482381] [lua/INFO] Task 'Task 3' is done
> [Tremblay:Master:(1) 1.606113] [lua/INFO] Done sending 'Task 7' to 'slave 3'
> [Tremblay:Master:(1) 1.606113] [lua/INFO] Sending  'Task 8' to 'slave 0'
> [Ginette:Slave:(5) 1.606113] [lua/INFO] Received task 'Task 7' on mailbox 'slave 3'
> [Bourassa:Slave:(2) 1.615000] [lua/INFO] Task 'Task 4' is done
> [Jupiter:Slave:(3) 1.648994] [lua/INFO] Task 'Task 5' is done
> [Tremblay:Master:(1) 1.747619] [lua/INFO] Done sending 'Task 8' to 'slave 0'
> [Tremblay:Master:(1) 1.747619] [lua/INFO] Sending  'Task 9' to 'slave 1'
> [Bourassa:Slave:(2) 1.747619] [lua/INFO] Received task 'Task 8' on mailbox 'slave 0'
> [Fafard:Slave:(4) 1.807391] [lua/INFO] Task 'Task 6' is done
> [Jupiter:Slave:(3) 1.916774] [lua/INFO] Received task 'Task 9' on mailbox 'slave 1'
> [Tremblay:Master:(1) 1.916774] [lua/INFO] Done sending 'Task 9' to 'slave 1'
> [Tremblay:Master:(1) 1.916774] [lua/INFO] Sending  'Task 10' to 'slave 2'
> [Fafard:Slave:(4) 2.075171] [lua/INFO] Received task 'Task 10' on mailbox 'slave 2'
> [Tremblay:Master:(1) 2.075171] [lua/INFO] Done sending 'Task 10' to 'slave 2'
> [Tremblay:Master:(1) 2.075171] [lua/INFO] Sending  'Task 11' to 'slave 3'
> [Jupiter:Slave:(3) 2.572116] [lua/INFO] Task 'Task 9' is done
> [Ginette:Slave:(5) 2.637211] [lua/INFO] Task 'Task 7' is done
> [Fafard:Slave:(4) 2.730513] [lua/INFO] Task 'Task 10' is done
> [Tremblay:Master:(1) 2.760943] [lua/INFO] Done sending 'Task 11' to 'slave 3'
> [Tremblay:Master:(1) 2.760943] [lua/INFO] Sending  'Task 12' to 'slave 0'
> [Ginette:Slave:(5) 2.760943] [lua/INFO] Received task 'Task 11' on mailbox 'slave 3'
> [Bourassa:Slave:(2) 2.778717] [lua/INFO] Task 'Task 8' is done
> [Tremblay:Master:(1) 2.911336] [lua/INFO] Done sending 'Task 12' to 'slave 0'
> [Tremblay:Master:(1) 2.911336] [lua/INFO] Sending  'Task 13' to 'slave 1'
> [Bourassa:Slave:(2) 2.911336] [lua/INFO] Received task 'Task 12' on mailbox 'slave 0'
> [Jupiter:Slave:(3) 3.080491] [lua/INFO] Received task 'Task 13' on mailbox 'slave 1'
> [Tremblay:Master:(1) 3.080491] [lua/INFO] Done sending 'Task 13' to 'slave 1'
> [Tremblay:Master:(1) 3.080491] [lua/INFO] Sending  'Task 14' to 'slave 2'
> [Fafard:Slave:(4) 3.238888] [lua/INFO] Received task 'Task 14' on mailbox 'slave 2'
> [Tremblay:Master:(1) 3.238888] [lua/INFO] Done sending 'Task 14' to 'slave 2'
> [Tremblay:Master:(1) 3.238888] [lua/INFO] Sending  'Task 15' to 'slave 3'
> [Jupiter:Slave:(3) 3.735833] [lua/INFO] Task 'Task 13' is done
> [Ginette:Slave:(5) 3.792041] [lua/INFO] Task 'Task 11' is done
> [Fafard:Slave:(4) 3.894230] [lua/INFO] Task 'Task 14' is done
> [Tremblay:Master:(1) 3.915773] [lua/INFO] Done sending 'Task 15' to 'slave 3'
> [Tremblay:Master:(1) 3.915773] [lua/INFO] Sending  'Task 16' to 'slave 0'
> [Ginette:Slave:(5) 3.915773] [lua/INFO] Received task 'Task 15' on mailbox 'slave 3'
> [Bourassa:Slave:(2) 3.942434] [lua/INFO] Task 'Task 12' is done
> [Tremblay:Master:(1) 4.075053] [lua/INFO] Done sending 'Task 16' to 'slave 0'
> [Tremblay:Master:(1) 4.075053] [lua/INFO] Sending  'Task 17' to 'slave 1'
> [Bourassa:Slave:(2) 4.075053] [lua/INFO] Received task 'Task 16' on mailbox 'slave 0'
> [Jupiter:Slave:(3) 4.244208] [lua/INFO] Received task 'Task 17' on mailbox 'slave 1'
> [Tremblay:Master:(1) 4.244208] [lua/INFO] Done sending 'Task 17' to 'slave 1'
> [Tremblay:Master:(1) 4.244208] [lua/INFO] Sending  'Task 18' to 'slave 2'
> [Fafard:Slave:(4) 4.402604] [lua/INFO] Received task 'Task 18' on mailbox 'slave 2'
> [Tremblay:Master:(1) 4.402604] [lua/INFO] Done sending 'Task 18' to 'slave 2'
> [Tremblay:Master:(1) 4.402604] [lua/INFO] Sending  'Task 19' to 'slave 3'
> [Jupiter:Slave:(3) 4.899550] [lua/INFO] Task 'Task 17' is done
> [Ginette:Slave:(5) 4.946871] [lua/INFO] Task 'Task 15' is done
> [Fafard:Slave:(4) 5.057947] [lua/INFO] Task 'Task 18' is done
> [Tremblay:Master:(1) 5.070603] [lua/INFO] Done sending 'Task 19' to 'slave 3'
> [Tremblay:Master:(1) 5.070603] [lua/INFO] Sending  'Task 20' to 'slave 0'
> [Ginette:Slave:(5) 5.070603] [lua/INFO] Received task 'Task 19' on mailbox 'slave 3'
> [Bourassa:Slave:(2) 5.106151] [lua/INFO] Task 'Task 16' is done
> [Tremblay:Master:(1) 5.238770] [lua/INFO] Done sending 'Task 20' to 'slave 0'
> [Tremblay:Master:(1) 5.238770] [lua/INFO] All tasks have been dispatched. Let's tell everybody the computation is over.
> [Tremblay:Master:(1) 5.238770] [lua/INFO] Sending finalize to 'slave 0'
> [Bourassa:Slave:(2) 5.238770] [lua/INFO] Received task 'Task 20' on mailbox 'slave 0'
> [Ginette:Slave:(5) 6.101701] [lua/INFO] Task 'Task 19' is done
> [Bourassa:Slave:(2) 6.269868] [lua/INFO] Task 'Task 20' is done
> [Tremblay:Master:(1) 6.402487] [lua/INFO] Sending finalize to 'slave 1'
> [Bourassa:Slave:(2) 6.402487] [lua/INFO] Got finalize message
> [Bourassa:Slave:(2) 6.402487] [lua/INFO] I'm done. See you!
> [Jupiter:Slave:(3) 6.571641] [lua/INFO] Got finalize message
> [Jupiter:Slave:(3) 6.571641] [lua/INFO] I'm done. See you!
> [Tremblay:Master:(1) 6.571641] [lua/INFO] Sending finalize to 'slave 2'
> [Fafard:Slave:(4) 6.730038] [lua/INFO] Got finalize message
> [Fafard:Slave:(4) 6.730038] [lua/INFO] I'm done. See you!
> [Tremblay:Master:(1) 6.730038] [lua/INFO] Sending finalize to 'slave 3'
> [Ginette:Slave:(5) 6.853770] [lua/INFO] Got finalize message
> [Ginette:Slave:(5) 6.853770] [lua/INFO] I'm done. See you!
> [Tremblay:Master:(1) 6.853770] [lua/INFO] Everything's done.
> [6.853770] [lua/INFO] Simulation's over. See you.
