A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deprecate the bindings of a deprecated function
[simgrid.git]
/
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
79ee80c
..
0d6ff44
100644
(file)
--- 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):
# 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)
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.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!")
simgrid.this_actor.info("Goodbye now!")
@@
-106,8
+106,7
@@
def create_hostzone(zone: simgrid.NetZone, coord: typing.List[int], ident: int)
link = host_zone.create_split_duplex_link("link-" + cpu_name, link_bw)
link.set_latency(link_lat).seal()
# connecting CPU to outer world
link = host_zone.create_split_duplex_link("link-" + cpu_name, link_bw)
link.set_latency(link_lat).seal()
# connecting CPU to outer world
- host_zone.add_route(host.netpoint, None, None, None,
- [simgrid.LinkInRoute(link, simgrid.LinkInRoute.Direction.UP)], True)
+ host_zone.add_route(host, None, [simgrid.LinkInRoute(link, simgrid.LinkInRoute.Direction.UP)], True)
# seal newly created netzone
host_zone.seal()
# seal newly created netzone
host_zone.seal()