X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea10e88fd41a11386d9e3868d72ab8cb933a4292..8d0b1f2f1840a16bb9551f1cfd74f2488599f95b:/teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.py diff --git a/teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.py b/teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.py index c9e92c7a8c..863b39244e 100644 --- a/teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.py +++ b/teshsuite/s4u/monkey-masterworkers/monkey-masterworkers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. +# Copyright (c) 2007-2023. 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. @@ -10,7 +10,7 @@ It is not written to be pleasant to read, but instead to resist the aggressions of the monkey: - Workers keep going until after a global variable `todo` reaches 0. - The master is a daemon that just sends infinitely tasks - (simgrid simulations stop as soon as all non-daemon actors are done). + (SimGrid simulations stop as soon as all non-daemon actors are done). - The platform is created programmatically to remove path issues and control the problem size. See the simgrid-monkey script for more information. @@ -63,7 +63,7 @@ def worker(my_id): assert Engine.clock < deadline, f"Failed to run all tasks in less than {deadline} seconds. Is this an infinite loop?" try: - this_actor.info(f"Waiting a message on mailbox") + this_actor.info("Waiting a message on mailbox") compute_cost = mailbox.get() this_actor.info("Start execution...") @@ -92,7 +92,7 @@ if __name__ == '__main__': for i in range(1, host_count): link = rootzone.create_split_duplex_link(f"link {i}", "1MBps").set_latency("24us") host = rootzone.create_host(f"lilibeth {i}", 1e9) - rootzone.add_route(main.netpoint, host.netpoint, None, None, [LinkInRoute(link, LinkInRoute.Direction.UP)], True) + rootzone.add_route(main, host, [link]) Actor.create("worker", host, worker, i).set_auto_restart(True) e.netzone_root.seal()