[Simgrid-user] changing a task's computation_amount
arnaud.legrand at imag.fr
Mon Jul 7 21:54:35 CEST 2008
Leland Hovey a écrit :
> 1. Does simgrid 3.3 permit changing a task's computation_amount
> w/o a function call?
There is no such thing for the moment.
> I realize this has a downside.
> 2. ((simdata_task_t)task->simdata)->computation_amount -= 1.2,
> is basically what I want but it produces a syntax error.
Well it produces a syntax error because you do not load
src/msg/private.h. And anyway it will not work if the task is already
running, which is the only situation I can think of where you may want
to do that (otherwise you shoudl better have created another task).
> 3. What's the usual fix for this?
Cancel the task and create a new one with the right duration... You can
also hack in a very non portable and unsuported way (read "you'll be on
your own here..." ;) by loading src/msg/portable.h and
src/include/surf.h and updating the remains field of the corresponding
More information about the Simgrid-user