Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolated start-up and shut-down graphs. #5090

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hjoliver
Copy link
Member

@hjoliver hjoliver commented Aug 22, 2022

Close #4912
Supersede #5036
(Really addresses the original #4903 but specifically just for start-up and shut-down graphs)

Implements isolated initial and final graphs as special non-advancing cycle points, to avoid the pain of eternal dependence on initial and final tasks.

The initial cycle point is called alpha and the final one omega.

  • first and last letters of the greek alphabet
  • avoids potential confusion with the initial/final/start/stop cycle points of the main graph
  • (these names are a minor detail, subject to discussion!)

How it works:

  • at start-up, the alpha graph loads and runs to completion
  • then the main (cycling) graph loads, and runs to completion
  • then the omega graph loads and runs to completion

Also:

  • restart works as normal, in any of the graphs
  • you can manually trigger tasks in any section, in which case (e.g.) alpha/foo will coexist in the task pool with 3/bar etc.
    • if you need to retrigger an initial install task (e.g.) part way through a workflow run, you may or may not want to pause the main flow while it runs - to handle this we should implement flow pause (which is intended anyway, but not done yet)

EXAMPLE

[scheduling]
    [[graph]]
        alpha = "a => b"
        omega = "x => y"
        R1 = "foo => bar"
[runtime]
    [[a, b, x, y, foo, bar]]

Result:

$ cylc cat-log junk | grep '=> running'
INFO - [alpha/a submitted job:01 flows:1] => running
INFO - [alpha/b submitted job:01 flows:1] => running
INFO - [1/foo submitted job:01 flows:2] => running
INFO - [1/bar submitted job:01 flows:2] => running
INFO - [omega/x submitted job:01 flows:3] => running
INFO - [omega/y submitted job:01 flows:3] => running

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at Document alpha and omega graphs. cylc-doc#559
  • If this is a bug fix, PRs raised to both master and the relevant maintenance branch.

@hjoliver hjoliver added this to the cylc-8.1.0 milestone Aug 22, 2022
@hjoliver hjoliver self-assigned this Aug 22, 2022
@hjoliver hjoliver modified the milestones: cylc-8.1.0, cylc-8.x Aug 22, 2022
@hjoliver hjoliver force-pushed the initial-final-graph branch 5 times, most recently from bcb5b05 to 8d09900 Compare September 26, 2022 03:46
@hjoliver hjoliver changed the title No-cycle start-up and shut-down graphs. Isolated start-up and shut-down graphs. Sep 26, 2022
@hjoliver hjoliver marked this pull request as ready for review September 26, 2022 21:17
@hjoliver hjoliver modified the milestones: cylc-8.x, cylc-8.1.0 Sep 26, 2022
@oliver-sanders oliver-sanders modified the milestones: cylc-8.1.0, cylc-8.2.0 Oct 18, 2022
@hjoliver hjoliver modified the milestones: cylc-8.2.0, cylc-8.1.0 Oct 25, 2022
@hjoliver
Copy link
Member Author

hjoliver commented Oct 25, 2022

I'm tentatively putting this one back to 8.1.0.

  • It's ready to go and shouldn't be hard to review (and the underlying principles were discussed at length and agreed)
  • It's a nice feature that many users will like (it makes special behaviour at start much easier to understand and configure)
  • It has some nasty conflict potential if left too long

@hjoliver
Copy link
Member Author

Merged master and deconflicted.

@hjoliver
Copy link
Member Author

@dpmatthews - pinging you for a big-picture review (given your involvement in the discussions that led to this).

@hjoliver
Copy link
Member Author

Squashed and rebased.

@hjoliver
Copy link
Member Author

(Rebased)

@hjoliver
Copy link
Member Author

(Rebased)

@oliver-sanders oliver-sanders modified the milestones: cylc-8.3.0, cylc-8.x Aug 10, 2023
commit ad8231a8f22dd3cd8d887774474f97df2c83e429
Merge: acc0ca3 6fc3c58
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Mon Mar 20 10:27:19 2023 +1300

    Merge branch 'master' into initial-final-graph

commit acc0ca3
Author: Hilary Oliver <hilary.j.oliver@gmail.com>
Date:   Wed Oct 26 12:00:00 2022 +1300

    Style fix.

commit a7170fb
Author: Hilary Oliver <hilary.j.oliver@gmail.com>
Date:   Wed Oct 26 11:53:31 2022 +1300

    Update change log.

commit 9024065
Merge: 858a8c1 b0ff549
Author: Hilary Oliver <hilary.j.oliver@gmail.com>
Date:   Wed Oct 26 11:32:26 2022 +1300

    Merge branch 'master' into initial-final-graph

commit 858a8c1
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Mon Sep 26 23:27:01 2022 +1300

    Fix alpha/omega graph runahead release.

commit b581ab2
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Mon Sep 26 23:26:33 2022 +1300

    Add new func tests.

commit 8d09900
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Mon Sep 26 15:53:42 2022 +1300

    Revert graph sorting change.

commit 75c1763
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Fri Sep 23 22:44:08 2022 +1200

    Adapt integration tests.

commit 1b685a0
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Fri Sep 23 15:55:57 2022 +1200

    Tidy up.

commit 7a62450
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Fri Sep 23 13:20:51 2022 +1200

    Switch to alpha and omega.

commit 129c2e3
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Fri Sep 23 10:32:54 2022 +1200

    Implicit integer ICP if only nocycle graphs.

commit a53ac82
Author: Hilary James Oliver <hilary.j.oliver@gmail.com>
Date:   Thu Sep 22 16:23:16 2022 +1200

    startup and shutdown graphs; needs tidying
@hjoliver
Copy link
Member Author

hjoliver commented Sep 4, 2023

(Rebased)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variable runahead limit, for start-up graphs.
2 participants