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

Relative Inter Cycle Dependencies #2452

Open
oliver-sanders opened this issue Oct 18, 2017 · 5 comments
Open

Relative Inter Cycle Dependencies #2452

oliver-sanders opened this issue Oct 18, 2017 · 5 comments
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Oct 18, 2017

Note: Please update this example when addressing this issue.

With integer cycling the last cycle can be referenced by -P1, the second last with -P2 and so on. With date-time cycling we lose this functionality.

There are three ways we might want to write inter-cycle triggers with datetime cycling:

ISO8601 Duration

As we presently do though I'd suggest that this covers a small set of use
cases:

    [T00]
        graph = foo[-P1D] => bar

Relative Cycle

As we presently do with integer cycling:

    [T00]
        graph = foo[-P1] => bar

Relative Cycle On Current Recurrence

Refer to the previous cycle on the current recurrence. Possible syntax:

    [T12]
        graph = foo
    [T00]
        graph = foo[-R1] => bar  # bar depends on foo from the previous T00
                                 # cycle.

Conclusions

Doing so would enable graph sections to be written independently of the recurrence with which they are implemented:

Note that there is a runtime component to this as tasks will need to determine the cycle point at which their previous occurrence occurred ...

@oliver-sanders oliver-sanders added this to the later milestone Oct 18, 2017
@oliver-sanders
Copy link
Member Author

Another request for this today, see also https://github.com/cylc/cylc/wiki/Possible-Cylc-Futures#graphs

@matthewrmshin
Copy link
Contributor

Ditto for runtime environment. A task may need to know:

  • What cycle is my predecessor in?
  • What cycle is my successor in?
  • How long is the current cycle?
    • A cycle can be regarded as a duration of time starting from the current cycle point, and ending moment before the next cycle point.
    • In a climate suite, we may need to ask what is the final day of the current cycle?

@oliver-sanders
Copy link
Member Author

(note the ability to specify "this task at it's last occurrence on any recurrence" would finally do away with the need for sequential tasks)

@oliver-sanders oliver-sanders modified the milestones: cylc-9, some-day Jul 4, 2023
@dwsutherland
Copy link
Member

dwsutherland commented Aug 28, 2024

Reposting form Element:

We have a[^] => b for relying on ICP tasks.. Perhaps we could also have [<] (and maybe [>]) to depend on the the previous (or next) instance of a task, e.g:

    [[graph]]
        T01, T03, T07 =  a[<] => a

This means we can deprecate [scheduling][special tasks]sequential, but can also be used with other than self:

    [[graph]]
        T01, T03, T07 =  a
        T02, T05, T11 = a[<] => b

Not sure if we'd want to take this any further though, i.e. [<2] (2 occurrences ago)

@Dooruk
Copy link

Dooruk commented Oct 16, 2024

I see it is a long withstanding issue but just wanted to say this would be something quite useful for our Cylc dependent workflow as well!

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

No branches or pull requests

4 participants