X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5916afe8cc535a67f2dd5d233080c3f005ba5a51..aaefeb18b3307df62ee762f3de31decf7ae3d442:/examples/python/task-variable-load/task-variable-load.py diff --git a/examples/python/task-variable-load/task-variable-load.py b/examples/python/task-variable-load/task-variable-load.py index 73105847ce..51dbc1a6c6 100644 --- a/examples/python/task-variable-load/task-variable-load.py +++ b/examples/python/task-variable-load/task-variable-load.py @@ -33,19 +33,18 @@ def callback(t): def variable_load(t): print('--- Small load ---') for _ in range(3): - t.enqueue_execs(1) + t.enqueue_firings(1) this_actor.sleep_for(100) this_actor.sleep_for(1000) print('--- Heavy load ---') for _ in range(3): - t.enqueue_execs(1) + t.enqueue_firings(1) this_actor.sleep_for(1) if __name__ == '__main__': args = parse() e = Engine(sys.argv) e.load_platform(args.platform) - Task.init() # Retrieve hosts tremblay = e.host_by_name('Tremblay') @@ -59,7 +58,7 @@ if __name__ == '__main__': comm.add_successor(exec) # Add a function to be called when tasks end for log purpose - Task.on_end_cb(callback) + Task.on_completion_cb(callback) # Create the actor that will inject load during the simulation Actor.create("input", tremblay, variable_load, comm)