A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MC: move the reversible_race logic to the Transition class
[simgrid.git]
/
examples
/
python
/
task-simple
/
task-simple.py
diff --git
a/examples/python/task-simple/task-simple.py
b/examples/python/task-simple/task-simple.py
index 29a24b7f66d3afd0d8e53a31876db79235fa1e5e..beca2b6a2cea60d90c32055e235963b89cc2892f 100644
(file)
--- a/
examples/python/task-simple/task-simple.py
+++ b/
examples/python/task-simple/task-simple.py
@@
-27,14
+27,13
@@
def parse():
)
return parser.parse_args()
)
return parser.parse_args()
-def callback(
t):
- print(f'[{Engine.clock}] {
t} finished ({ t.count
})')
+def callback(t):
+ print(f'[{Engine.clock}] {
t} finished ({t.get_count()
})')
if __name__ == '__main__':
args = parse()
e = Engine(sys.argv)
e.load_platform(args.platform)
if __name__ == '__main__':
args = parse()
e = Engine(sys.argv)
e.load_platform(args.platform)
- Task.init()
# Retrieve hosts
tremblay = e.host_by_name('Tremblay')
# Retrieve hosts
tremblay = e.host_by_name('Tremblay')
@@
-50,11
+49,10
@@
if __name__ == '__main__':
comm.add_successor(exec2)
# Add a function to be called when tasks end for log purpose
comm.add_successor(exec2)
# Add a function to be called when tasks end for log purpose
- Task.on_
end
_cb(callback)
+ Task.on_
completion
_cb(callback)
- # Enqueue two
execution
s for task exec1
- exec1.enqueue_
exec
s(2)
+ # Enqueue two
firing
s for task exec1
+ exec1.enqueue_
firing
s(2)
# runs the simulation
e.run()
# runs the simulation
e.run()
-