X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a63884b15fee21a09274893023af54be40b0bbe2..a0d47b6eaf07218a602ed6606da925fbd3629909:/examples/python/clusters-multicpu/clusters-multicpu.py diff --git a/examples/python/clusters-multicpu/clusters-multicpu.py b/examples/python/clusters-multicpu/clusters-multicpu.py index 79ee80cf98..b48cb38dd1 100644 --- a/examples/python/clusters-multicpu/clusters-multicpu.py +++ b/examples/python/clusters-multicpu/clusters-multicpu.py @@ -28,19 +28,19 @@ class Sender: # Actors that are created as object will execute their __call__ method. # So, the following constitutes the main function of the Sender actor. def __call__(self): - pending_comms = [] + pending_comms = simgrid.ActivitySet() mboxes = [] for host in self.hosts: msg = "Hello, I'm alive and running on " + simgrid.this_actor.get_host().name mbox = simgrid.Mailbox.by_name(host.name) mboxes.append(mbox) - pending_comms.append(mbox.put_async(msg, self.msg_size)) + pending_comms.push(mbox.put_async(msg, self.msg_size)) simgrid.this_actor.info("Done dispatching all messages") # Now that all message exchanges were initiated, wait for their completion in one single call - simgrid.Comm.wait_all(pending_comms) + pending_comms.wait_all() simgrid.this_actor.info("Goodbye now!")