Problems with (family) triggers

Kia ora! I am now trying to introduce dependency between “casts” in my workflow, but I am getting an error that I can’t get rid of. I am doing this in a simplified workflow, and here is the relevant bit of code :

{% set EXP_START_DATE = '20250317' %}
{% set EXP_END_DATE = '20250323' %}
{% from "recurrence" import recur_mon, recur_wed, recur_thu %}
{% set recur = {"hindcast": recur_mon(EXP_START_DATE), "nowcast": recur_wed(EXP_START_DATE), "forecast": recur_wed(EXP_START_DATE), "daily_forecast": "P1D"} %}
{% set RECUR_MON = recur_mon(EXP_START_DATE) %}
{% set RECUR_WED = recur_wed(EXP_START_DATE) %}
{% set RECUR_THU = recur_thu(EXP_START_DATE) %}
{% set EXP_START_DATE = '20250113' %}
{% set EXP_END_DATE = '20250127' %}
{% from "load_data" import load_json %}
{% set casts = load_json('casts.json') %}

[scheduler]
    cycle point format = %Y%m%d

{% for cast in casts %}
[task parameters]
    cycle_{{cast['exemode']}} = {{ cast["cycle"] | join(', ') }}
{% endfor %}

[ scheduling ]

    initial cycle point = {{ EXP_START_DATE }}
    final cycle point = {{ EXP_END_DATE }}


    [[ graph ]]

        R1 = """ clean """

{% for cast in casts %}
    {{ recur[cast['exemode']] }} = """
            clean[^] => {{cast['exemode']}}_init => {{cast['exemode']}}_block_DATA => {{cast['exemode']}}_block_NEMO<cycle_{{cast['exemode']}}=0> => {{cast['exemode']}}_com2newcom
    {% if cast['ig_modesystem'] == 0 %}
        {{cast['exemode']}}_block_NEMO<cycle_{{cast['exemode']}}=0> => {{cast['exemode']}}_ola2wola<cycle_{{cast['exemode']}}=0> & {{cast['exemode']}}_concat_bias_hts
        {{cast['exemode']}}_com2newcom => {{cast['exemode']}}_MROA
        {{cast['exemode']}}_ola2wola<cycle_{{cast['exemode']}}=0> & {{cast['exemode']}}_concat_bias_hts => {{cast['exemode']}}_create_lightout
        {{cast['exemode']}}_create_lightout => {{cast['exemode']}}_block_BIASTS
        {{cast['exemode']}}_block_NEMO<cycle_{{cast['exemode']}}=1> => {{cast['exemode']}}_ola2wola<cycle_{{cast['exemode']}}=1>
        {{cast['exemode']}}_MROA => {{cast['exemode']}}_cpmxpackcmz2cpmx => {{cast['exemode']}}_cpmx2cdf => {{cast['exemode']}}_cdf2cmx
        {{cast['exemode']}}_cdf2cmx => {{cast['exemode']}}_cmx2splitcmx => {{cast['exemode']}}_canredcmx2cmx_forsplit
        {{cast['exemode']}}_canredcmx2cmx_forsplit => {{cast['exemode']}}_cpmx2cdf_forsplit
        {{cast['exemode']}}_block_BIASTS & {{cast['exemode']}}_cdf2cmx => {{cast['exemode']}}_block_NEMO<cycle_{{cast['exemode']}}=1>
    {% endif %}
    """
{% endfor %}

        {{ RECUR_MON }} = hindcast[-P7D] => hindcast
        {{ RECUR_WED }} =  """
              hindcast[-P1D] => nowcast
              nowcast[-P1D] => forecast
        """
        {{ RECUR_THU }} = nowcast[-P1D] => daily_forecast
        ! ({{ RECUR_THU }}) = daily_forecast[-P1D] => daily_forecast

[ runtime ]
    [[ root ]]
        [[[ environment ]]]
            TEST_DIR = /Users/gturek/dev/cylc_tests/${CYLC_WORKFLOW_ID}

    [[ clean ]]
        script = """
            rm -rf ${TEST_DIR}
        """

{% for cast in casts %}

    [[ {{ cast['exemode'] }}_init ]]
        script =  """
            mkdir -p ${TEST_DIR}/{{cast['exemode']}}/${CYLC_TASK_CYCLE_POINT}
            init_date_vars.sh ${CYLC_TASK_CYCLE_POINT} {{cast['exemode']}} {{cast['cycle_length']}}
        """
etc, etc

What is giving me problems is the bit:

        {{ RECUR_MON }} = hindcast[-P7D]:succeed_all => hindcast
        {{ RECUR_WED }} =  """
              hindcast[-P1D] => nowcast
              nowcast => forecast
        ""
        {{ RECUR_THU }} = nowcast[-P1D] => daily_forecast
        ! ({{ RECUR_THU }}) = daily_forecast[-P1D] => daily_forecast

As is I get the validation error:
GraphParseError: Family trigger required: hindcast[-P1] => hindcast
which makes sence since hindcast, etc are a family.

But if I add “:succeed_all” I get the error

GraphParseError: Illegal family trigger: hindcast:succeed_all

I am stuck…
Thanx!
Gaby

Hi,

Try succeed-all with a hyphen rather than an underscore.

Wow, that is a serious case of PEBKAB. Cheers!

headbang

1 Like

No probs, we could do with improving those error messages.