Cylc8b1 dependent jobs not waiting for completion?

I’m trying to set up a basic cycled workflow where a chain of jobs is exectuted one task after another in a chain:

run_cesm=>run_post=>run_ml=>update_case=>run_cesm=>[repeat]. I have tried to set this up using integer cycling to run twice, with run_cesm replaced by sleep 600 to create a delay. But what is happening is the workflow is just running straight through, so I end up with two copies of run_cesm running simultaneously. Presumably this is because I have screwed up my flow.cylc - if someone can tell me how to do this correctly I will be grateful. :slight_smile:

 {% set ncycles = 2 %}
     title = "flow.cylc for MITC test run"
      cycling mode=integer
      initial cycle point =1
      final cycle point={{ncycles}}
          R/^/P1 = """
 #        platform = cheyenne
         platform = cheyenne
         execution time limit = PT12H
 #        script = cd /glade/work/bcash/ssf/my_cesm_sandbox/cime/scripts/MITC_base; /glade/work/bcash/ssf/my_cesm_sandbox/cime/scripts/MITC_base/
         script = sleep 600
         script = echo "run_post placeholder"
         script = echo "run_ml placeholder"
         script = echo "update_case placeholder"

The inter-cycle dependencies are a little bit off, here’s a graphical representation:


Here’s an example which I think is closer to what you want:

    allow implicit tasks = True

    initial cycle point = 1
    cycling mode = integer
        P1 = """
            # the repeating unit
            run_cesm => run_post => run_ml => update_case
            # the cycling rules that constrain the parallelism
            update_case[-P1] => run_cesm

At the moment Cylc8 does not have the ability to generate these graphs for you (will arrive in the new Cylc GUI in the future), in the mean time I generated these graphs using the following bash script:

#!/usr/bin/env bash

set -eu



cylc graph --color=never --reference "$SUITE" > "$TMP.ref"

sed \
    -e 's/node "\(.*\)" "\(.*\)"/"\1" [label="\2"]/' \
    -e 's/edge "\(.*\)" "\(.*\)"/"\1" -> "\2"/' \
    -e '1i digraph {' \
    -e '$a}' \
    -e '/^graph$/d' \
    -e '/^stop$/d' \
    "$TMP.ref" \
    > "$"

dot \
    "$" \
    -T"$FMT" \
    -o "$TMP.$FMT"

rm "$TMP.ref" "$"

echo "written to $TMP.$FMT"
1 Like

That did it, thanks!