1 # Copyright (c) 2019-2021. The SimGrid Team. All rights reserved.
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the license (GNU LGPL) which comes with this package.
6 # First failing example for bug #9 on Framagit (Python bindings crashing)
8 # A heavy operation is added after e.run() (here, it's "import gc"). Note that
9 # the failure only occurs when the actor "sender" starts first, and the
10 # scheduling is interlaced: sender starts, receiver starts, sender terminates,
11 # receiver terminates.
14 from simgrid import Engine, this_actor
17 this_actor.sleep_for(3)
18 this_actor.info("Goodbye now!")
21 this_actor.sleep_for(5)
22 this_actor.info("Five seconds elapsed")
24 if __name__ == '__main__':
27 e.load_platform(sys.argv[1]) # Load the platform description
29 # Register the classes representing the actors
30 e.register_actor("sender", sender)
31 e.register_actor("receiver", receiver)
33 e.load_deployment(sys.argv[2])
36 this_actor.info("Dummy import...")
39 this_actor.info("done.")