X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3f756b051175054c62c4741fdab2a6b934828262..8bf7ffc43ad5507982e924a7f05bbb13c89965cb:/examples/python/plugin-host-load/plugin-host-load.py diff --git a/examples/python/plugin-host-load/plugin-host-load.py b/examples/python/plugin-host-load/plugin-host-load.py index 3b6156caa3..71d3ac8f4c 100644 --- a/examples/python/plugin-host-load/plugin-host-load.py +++ b/examples/python/plugin-host-load/plugin-host-load.py @@ -6,7 +6,7 @@ from argparse import ArgumentParser import sys -from simgrid import Engine, Host, this_actor, Actor +from simgrid import Engine, Host, this_actor, Actor, sg_host_load_plugin_init def parse(): parser = ArgumentParser() @@ -48,7 +48,7 @@ far: {host.computed_flops:.0E}, average load as reported by the HostLoad plugin: this_actor.info(f'Run an activity of {100E6:.0E} flops') this_actor.execute(100E6) this_actor.info(f'Done working on my activity; this took {Engine.clock - start}s; current peak speed: {host.speed:.0E} flop/s; number of flops computed so far: {host.computed_flops:.0E}') - Engine + start = Engine.clock this_actor.info("========= Requesting a reset of the computation and load counters") host.reset_load() @@ -73,7 +73,8 @@ def change_speed(): if __name__ == '__main__': args = parse() - Host.sg_host_load_plugin_init() + + sg_host_load_plugin_init() e = Engine(sys.argv) e.load_platform(args.platform)