Possible bug when using future dependencies close to year 0

Hello,

This question (bug report?) pertains to cylc 8.4.1. The issue is that cylc validate, as well as actual workflow runs, fail when future dependencies are used at time points close to year zero.

As an example, the following graph works without issues:

[scheduler]
    allow implicit tasks = True
[scheduling]
    initial cycle point = 0001
    final cycle point = 0010
    [[graph]]
        P1Y = foo
	P1Y = foo[+P1Y] => bar

But if the last line is changed to P1Y = foo[+P2Y] => bar, then cylc validate . fails with:

WorkflowConfigError: failed to instantiate task foo: Cannot dump TimePoint year: -1 not in bounds 0 to 9999.

Similarly, if the last line is changed to P1Y = foo[+P3Y] => bar, then the error becomes:

WorkflowConfigError: failed to instantiate task foo: Cannot dump TimePoint year: -2 not in bounds 0 to 9999.

In general, the number in the message always equals initial cycle point minus the interval given for the future foo dependency.

So my question is: is this a bug, or user error?

Thank you!

I’m not sure if that’s a bug, or just a limitation of our datetime library (metomi/isodate) not being able to handle negative dates! (Actually, even if that is a limitation, we should still work around it in Cylc, to allow your graph to function properly).

I’ll let the UK team chime on in this, as they’re the experts on that library.

To unlock dates before 0 or after 9999, you need to turn on the “expanded” datetime format (ISO8601 extended format):

This’ll do it:

[scheduler]
    allow implicit tasks = True
    cycle point num expanded year digits = 2

[scheduling]
    initial cycle point = -000001
    final cycle point = +000010
    [[graph]]
        P1Y = foo
        P1Y = foo[+P1Y] => bar

For more info on the extended format, see this note:

1 Like