Cylc7 vs 8 task paramters with <x+1> differences - which is correct?


suite.rc/flow.cylc as per below.

    UTC mode = True
        x  = 1..3
    initial cycle point = 20200101T0000Z
    final cycle point = 20200101T1200Z
            graph = ic => a<x>
            graph = """
                 => b<x>
                 => c<x>

        script = false

They produce different graphs for Cylc7 and Cylc8. Different results are expected for x-1 (thanks @oliver.sanders for pointing that out to me), but that documentation does not say that x+1 would produce different results. Based on the reasoning in the documentation, I imagine the x+1 case is expected too, but it is not documented.

For comparison, here are the reference outputs for both (just the edge part of the reference outputs)

Cylc 7

$ cylc graph -r $PWD 20200101T0000Z 20200101T0000Z | grep edge
edge "a_x2.20200101T0000Z" "b_x1.20200101T0000Z"
edge "a_x3.20200101T0000Z" "b_x2.20200101T0000Z"
edge "b_x1.20200101T0000Z" "c_x1.20200101T0000Z"
edge "b_x2.20200101T0000Z" "c_x2.20200101T0000Z"
edge "b_x3.20200101T0000Z" "c_x3.20200101T0000Z"
edge "ic.20200101T0000Z" "a_x1.20200101T0000Z"
edge "ic.20200101T0000Z" "a_x2.20200101T0000Z"
edge "ic.20200101T0000Z" "a_x3.20200101T0000Z"

Cylc 8

$ cylc graph -r $PWD 20200101T0000Z 20200101T0000Z 2>/dev/null | grep edge
edge "20200101T0000Z/a_x2" "20200101T0000Z/b_x1"
edge "20200101T0000Z/a_x3" "20200101T0000Z/b_x2"
edge "20200101T0000Z/b_x1" "20200101T0000Z/c_x1"
edge "20200101T0000Z/b_x2" "20200101T0000Z/c_x2"
edge "20200101T0000Z/ic" "20200101T0000Z/a_x1"
edge "20200101T0000Z/ic" "20200101T0000Z/a_x2"
edge "20200101T0000Z/ic" "20200101T0000Z/a_x3"

What is different?

Cylc7 has b_x3 and c_x3. Cylc8 does not. Either this is a bug or a gap in documentation for the Cylc7-to-8 changes. My guess is its the latter.

Yes, you’re right. That’s the same change as for <x-1>, but at the upper bound of the parameter range rather than the lower bound. For Cylc 8 we decided it is safest to ignore the associated graph dependency chain when a task parameter offset goes out of bounds.

We’ll update docs - thanks for reporting this!

A slightly more concise example, if anyone’s interested:

    allow implicit tasks = True
[task parameters]
     x  = 1..3
        R1 = """
           ic => a<x>
           a<x+1> => b<x> => c<x>

Cylc 7:


Cylc 8: