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
fix all Task examples to support the new Task format with dispatcher and collector
[simgrid.git]
/
examples
/
python
/
task-io
/
task-io.py
diff --git
a/examples/python/task-io/task-io.py
b/examples/python/task-io/task-io.py
index
b74c411
..
d3ab8c1
100644
(file)
--- a/
examples/python/task-io/task-io.py
+++ b/
examples/python/task-io/task-io.py
@@
-18,13
+18,12
@@
def parse():
return parser.parse_args()
def callback(t):
return parser.parse_args()
def callback(t):
- print(f'[{Engine.clock}] {t} finished ({t.
count
})')
+ 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
bob = e.host_by_name('bob')
# Retrieve hosts
bob = e.host_by_name('bob')
@@
-42,10
+41,10
@@
if __name__ == '__main__':
read.add_successor(exec2)
# Add a function to be called when tasks end for log purpose
read.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()