Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Refactorize the sthread interception of functions
[simgrid.git] / examples / python / plugin-host-load / plugin-host-load.py
index 3b6156caa3eda89c339951fe19383c36fefb85dc..71d3ac8f4ca1585056664e3fd2a216d84db5fbef 100644 (file)
@@ -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)