| 1 |
|
| 2 |
# Complete a parentless switch task that already exists in the pool but is |
| 3 |
# beyond the runahead limit. Cylc should auto-spawn its next instance to |
| 4 |
# avoid premature shutdown when it is removed as complete. |
| 5 |
# (We only spawn the first runahead-limited instance of parentless tasks). |
| 6 |
|
| 7 |
[scheduler] |
| 8 |
allow implicit tasks = True |
| 9 |
|
| 10 |
[scheduling] |
| 11 |
initial cycle point = 1 |
| 12 |
final cycle point = 4 |
| 13 |
cycling mode = integer |
| 14 |
runahead limit = P0 |
| 15 |
[[graph]] |
| 16 |
P1 = """ |
| 17 |
a:x? => x |
| 18 |
a:y? => y |
| 19 |
x | y => z |
| 20 |
""" |
| 21 |
[runtime] |
| 22 |
[[a]] |
| 23 |
script = """ |
| 24 |
cylc__job__wait_cylc_message_started |
| 25 |
cylc message -- x # always go x-path |
| 26 |
""" |
| 27 |
[[[outputs]]] |
| 28 |
x = x |
| 29 |
y = y |
| 30 |
[[z]] |
| 31 |
script = """ |
| 32 |
if (( CYLC_TASK_CYCLE_POINT == 1 )); then |
| 33 |
# mark 2/a as succeeded with output y |
| 34 |
# (task will be skipped) |
| 35 |
cylc set "${CYLC_WORKFLOW_ID}//2/a" --out=y,succeeded |
| 36 |
elif (( CYLC_TASK_CYCLE_POINT == 2 )); then |
| 37 |
# mark 2/a as having generated output y |
| 38 |
# (task will re-run and generate output x in the prociess) |
| 39 |
cylc set "${CYLC_WORKFLOW_ID}//3/a" --out=y |
| 40 |
fi |
| 41 |
""" |