If you want to re-run the workflow from beginning to end, the easiest way is to create a new run with cylc vip. This creates a new installation of the workflow, separate to the old one which prevents data assets created by the first run, from polluting the second.
We would only re-run tasks within the same installation (the question you are asking) if we wanted them to inherit the data left behind by their predecessors. So, in general, create a new run with cylc vip and remove the old run with cylc clean.
However, there are situations where we would want to re-trigger a subgraph of tasks with the data from their previous runs, an example might be incremental build systems.
In these situations, if you know the list of tasks you want to run, trigger them all in a single command and Cylc will run them through in order, for example:
# re-run the specified tasks
cylc trigger 'gmcylc_u3//' '//^/Prep' '//^/task-1' '//^/task-2' '//1/foo[123]'
Note, you can groups of tasks by referencing cycles (e.g, //^ or //1), or families (e.g, //^/PREP), or using patterns (e.g, //^/*hpc, //5/foo_*).
If you cannot list the tasks you want to re-run, the documented solution is to create a new “flow”. This is an advanced intervention that creates a new execution of the workflow’s graph.
# re-run Prep and everything after it
cylc trigger 'gmcylc_u3//^/Prep' --flow=new
If you want to prevent a workflow from running past a specified point, e.g, “run the next 5 tasks”, then hold the tasks you don’t want to run.
This can be done by:
- Setting the workflow’s
--hold-after-cycle (see cylc play --help).
- Holding the tasks you don’t want to run (see `cylc hold --help``).
- Telling the workflow to shut down after a specified task or cycle (see
cylc stop --help).