Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
trailing spaces
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 31 Dec 2018 01:56:39 +0000 (02:56 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 31 Dec 2018 01:56:39 +0000 (02:56 +0100)
examples/python/actor-create/actor-create.py
examples/python/actor-yield/actor-yield.py
examples/python/exec-basic/exec-basic.py

index 52d4650..20a4daf 100644 (file)
@@ -37,7 +37,7 @@ def forwarder(*args):
   if len(args) < 2: raise AssertionError("Actor forwarder requires 2 parameters, but got only {:d}".format(len(args)))
   mb_in  = simgrid.Mailbox.by_name(args[0])
   mb_out = simgrid.Mailbox.by_name(args[1])
-  
+
   msg = mb_in.get()
   simgrid.info("Forward '{:s}'.".format(msg))
   mb_out.put(msg, len(msg))
@@ -91,10 +91,10 @@ if __name__ == '__main__':
   # For that, you first need to register your function or your actor as follows.
   e.register_actor("sender", Sender)
   e.register_actor("forwarder", forwarder)
-  # Once actors and functions are registered, just load the deployment file 
+  # Once actors and functions are registered, just load the deployment file
   e.load_deployment("actor-create_d.xml")
 
   # Once every actors are started in the engine, the simulation can start
   e.run();
 
-  # Once the simulation is done, the program is ended 
+  # Once the simulation is done, the program is ended
index db190d0..894a4ff 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2017-2018. The SimGrid Team. All rights reserved.         
+# Copyright (c) 2017-2018. 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.
@@ -13,7 +13,7 @@ import simgrid, sys
 #
 # It can also be used to benchmark our context-switching mechanism.
 
-# Main function of the Yielder process 
+# Main function of the Yielder process
 class Yielder:
     number_of_yields = 0
     def __init__(self, *args):
@@ -25,10 +25,10 @@ class Yielder:
 
 if __name__ == '__main__':
     e = simgrid.Engine(sys.argv)
-    
-    e.load_platform(sys.argv[1])             # Load the platform description 
+
+    e.load_platform(sys.argv[1])             # Load the platform description
     e.register_actor("yielder", Yielder)  # Register the class representing the actors
 
     e.load_deployment(sys.argv[2])
 
-    e.run() # - Run the simulation 
+    e.run() # - Run the simulation
index c5719c6..09d9dd6 100644 (file)
@@ -7,7 +7,7 @@ import sys
 import simgrid as sg
 
 def executor():
-    # execute() tells SimGrid to pause the calling actor until 
+    # execute() tells SimGrid to pause the calling actor until
     # its host has computed the amount of flops passed as a parameter
     sg.execute(98095)
     sg.info("Done.")
@@ -20,7 +20,7 @@ def privileged():
     # Since the priority is 2, it computes twice as fast as a regular one.
     #
     # So instead of a half/half sharing between the two executions,
-    # we get a 1/3 vs 2/3 sharing. 
+    # we get a 1/3 vs 2/3 sharing.
     sg.execute(98095, 2);
     sg.info("Done.");