Rerun 2 tasks which depend on one another in one command?

hi there,

i need to run an fcm_make and an fcm_make2 task multiple times in a development workflow and fcm_make2 can only run if fcm_make has completed successfully.

in cylc 7 i would’ve set both of their states to ‘waiting’ but i know that that doesn’t make sense if cylc 8.

how would i go about sorting this out without manually triggering fcm_make (with --flow=none) then waiting for it to complete and the finally manually triggering fcm_make2?

thanks!

jonny

Hi Jonny,

[First, as an aside, the development team has just agreed the final framework to support all manual interventions in Cylc 8, and we are about to crack on to implementation. You can do almost all of it already, but it will soon be clearer and better documented.]

With Cylc 8, there’s no need to re-“insert” old tasks and/or reset them all to “waiting” before triggering the first one. Simply trigger a task(s) anywhere with --flow=new. The flow will carry on from there as the graph dictates [Concurrent Flows — Cylc 8.1.4 documentation].

For the scenario you describe (rebuilding a model mid-run into a cycling workflow?) I imagine you don’t want the new flow to carry on downstream of the second task (fcm_make2) though.

fcm_make => fcm_make2 => a => b => c ...

(Using just cycle point “1” for simplicity, and workflow name “foo”):

$ cylc hold foo//1/a  # don't run 1/a even if ready
$ cylc trigger --flow=new foo//1/fcm_make  # trigger the new flow
$ # once fcm_make2 is done 1/a will return to the waiting state, but held
$ cylc remove foo//1/a  # remove the lined up waiting task, to end the new flow
1 Like

hi there, thanks for this!

For the scenario you describe (rebuilding a model mid-run into a cycling workflow?) I imagine you don’t want the new flow to carry on downstream of the second task (fcm_make2 ) though.

yes that’s exactly it.

ok cool, that works, thanks a lot! :slight_smile:

this is something of an edge-case because fcm_make tasks don’t always run in pairs like this and if there was just one then i could’ve just done --flow=none.

cheers!

Note to repeat run a single past task you don’t need --flow=none, just trigger the task. It will run again (because you told it to) but as part of the original flow, so it won’t continue on downstream because the original flow already traversed that part of the graph.

1 Like

ah ok, good to know!