hey,
i accidentally triggered some tasks which were downstream of a running task and want to ‘reset’ them, in the language of cylc
7!
the help says that cylc reset
has been replaced with cylc set-outputs
but it looks like this only changes tasks’ output to ‘succeeded’?
e.g. i’ve tried this and it doesn’t work…
cylc set-outputs u-cv956/run1//20000101T0000Z/housekeeping -o waiting
there’s clearly something missing in my understanding of how cylc
8 deals with this since i see that the docs say… It is no longer possible to manually change a task’s state.
thanks
Hi,
Cylc 8 doesn’t support the re-writing of history that Cylc 7 did. If a task has run, you can’t tell Cylc that it hasn’t.
If your goal was to re-run the tasks at a later time, rather than resetting them back to “waiting”, you would instead trigger a new “flow”.
# re-run <cycle>/<task> and everything downstream of it
$ cylc trigger <workflow>//<cycle>/<task> --flow=new
# OR re-run everything downstream of <cycle>/<task>
$ cylc set-outputs <workflow>//<cycle>/<task> --flow=new
https://cylc.github.io/cylc-doc/stable/html/glossary.html#term-flow
Note: you can “hold” tasks to prevent Cylc from running them, effectively dead-ending the workflow to stop it from running on until you want it to.
Let us know what you were trying to achieve by resetting the tasks and we can advise further.
1 Like
thanks a lot @oliver.sanders!
Let us know what you were trying to achieve by resetting the tasks and we can advise further.
basically in each cycle in this particular workflow (after R1
) there are 3 tasks…
atmos_main => postproc => housekeeping
after accidentally triggering all these tasks to run simultaneously, postproc
failed and then housekeeping
succeeded before atmos_main
succeeded.
i needed make sure these tasks ran again (in order) and so i didn’t want to trigger them to run straight away but to run them after atmos_main
had finished. so in cylc
7 language i would’ve used…
cylc reset WORKFLOW {postproc,housekeeping}.[cycle point]
hth! thanks
Hi @jonnyhtw
I’ll just point out for others that this could be more complicated in Cylc 7: if the workflow had moved on beyond this cycle point, you would have to:
- “insert” a waiting instance of each of the target tasks back into the graph back at that point
- then trigger the first one
In Cylc 8 it is easy, just trigger a new flow at the first task that you want to run, anywhere in the graph:
`cylc trigger --flow=new WORKFLOW//[cycle-point]/postproc`
When postproc
succeeds housekeeping
will run, as the graph says it should.
Note 1) --flow=new
is needed here because these tasks already ran in the original flow.
Note 2) You haven’t shown the full graph, but I presume a new flow triggered at atmos_main
would also lead on to future cycle points, so watch out for that (but it sounds like you don’t need to rerun atmos_main
so you only need to trigger postproc
, and that flow will end at housekeeping
in the same cycle point).
1 Like
hey,
ok yes this is exactly it; the --flow=new
bit is what i was missing. i’ve just tested it and it does exactly what i want, thanks! 
In Cylc, a flow is a self-propagating run through the workflow graph from some initial task(s).
great, i think this was the missing piece in my understanding.
cheers,
1 Like