Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[Lua] Renamed host 'power' to 'speed' for hosts
[simgrid.git] / examples / lua / multi_matrix / receiver.lua
index 64837b3..0ecf35b 100644 (file)
@@ -1,11 +1,17 @@
+-- Copyright (c) 2011, 2014. The SimGrid Team.
+-- All rights reserved.
+
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the license (GNU LGPL) which comes with this package.
+
 function Receiver(...)
 
   simgrid.info("Hello From Receiver")
-  local sender = simgrid.Host.getByName(arg[1])
-  local send_alias = arg[2]
+  local sender = simgrid.host.get_by_name(select(1, ...))
+  local send_alias = select(2, ...)
   local recv_alias = "Receiver"
-  simgrid.info("Receiving Task from " .. simgrid.Host.name(sender))
-  local task = simgrid.Task.recv(recv_alias)
+  simgrid.info("Receiving Task from " .. simgrid.host.name(sender))
+  local task = simgrid.task.recv(recv_alias)
   local mm = mmult(task['size'], task['size'], task['matrix_1'], task['matrix_2'])
   --mprint(task['size'], task['size'], mm)
   task['matrix_res'] = mm