# Cylc 8b2 GraphParseError

**URL:** <https://cylc.discourse.group/t/cylc-8b2-graphparseerror/374>\
**Category:** Cylc Support\
**Created:** [September 2, 2021, 4:47pm UTC](https://cylc.discourse.group/t/cylc-8b2-graphparseerror/374 "2021-09-02T16:47:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bencash](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@bencash](https://cylc.discourse.group/u/bencash)\
**Post date:** [September 2, 2021, 4:47pm UTC](https://cylc.discourse.group/t/cylc-8b2-graphparseerror/374/1 "2021-09-02T16:47:11Z")

</div>

I am running into a GraphParseError that I don’t understand. If I define my graph as below, everything validates.

```auto
[meta]
     title = "Basic cylc suite for batch submit"
[task parameters]
     ldate = 2013040100
[scheduling]
     [[dependencies]]
        R1 = """
        establish_run_dir<ldate> &
        copy_exec_fixed_files<ldate> & copy_fv3_fixed_files<ldate> &
        copy_cpl_fixed_files<ldate> & copy_mom6_fixed_files<ldate> &
        copy_cice6_fixed_files<ldate> & copy_ww3_fixed_files<ldate> &
        copy_post_files<ldate> & copy_ic_files<ldate> =>
        run_model<ldate>
        """

```

However, if I change the graph so that establish\_run\_dir has to run and complete before firing the other tasks (which is what I want), I think I would write it as:

```auto
 R1 = """
        establish_run_dir<ldate> =>
        copy_exec_fixed_files<ldate> & copy_fv3_fixed_files<ldate> &
        copy_cpl_fixed_files<ldate> & copy_mom6_fixed_files<ldate> &
        copy_cice6_fixed_files<ldate> & copy_ww3_fixed_files<ldate> &
        copy_post_files<ldate> & copy_ic_files<ldate> =>
        run_model<ldate>
        """

```

But this gives me the following error:

```auto
GraphParseError: null task name in graph:
  establish_run_dir_ldate2013040100 => 
copy_exec_fixed_files_ldate2013040100&copy_fv3_fixed_files_ldate2013040100&

```

I’ve done the sensitivity test so I know it is just changing that first & to =\> that triggers the error, but it seems like this is something I should be able to. As always, any help will be appreciated!

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [September 2, 2021, 8:23pm UTC](https://cylc.discourse.group/t/cylc-8b2-graphparseerror/374/2 "2021-09-02T20:23:57Z")

</div>

Hi @bencash,

The problem is we only support splitting of graph dependency chains on the dependency arrow `=>`.

We probably should allow splitting on `&` and `|` operators too, for those using crazy-long task names 😁 - I’ll post an issue on GitHub to consider that.

The quick and ugly workarounds:

- use very long lines and turn on line-wrapping in your code editor for Cylc
- OR use old-school line continuation characters (with no space allowed after them!):

```auto
R1 = """
   a => b & c & \
      d & e & \
         f & g
"""

```

---

<div class="post-metadata">

**Author:** ![bencash](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@bencash](https://cylc.discourse.group/u/bencash)\
**Post date:** [September 2, 2021, 9:07pm UTC](https://cylc.discourse.group/t/cylc-8b2-graphparseerror/374/3 "2021-09-02T21:07:49Z")

</div>

Line continuation characters did the trick. 🙂 And if I don’t use crazy long task names tomorrow I will be staring at this suite wondering what the 🤬 I was doing… 😉

---

<div class="post-metadata">

**Author:** ![edmundh](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/edmundh/32/70_2.png) [@edmundh](https://cylc.discourse.group/u/edmundh)\
**Post date:** [September 3, 2021, 9:28am UTC](https://cylc.discourse.group/t/cylc-8b2-graphparseerror/374/4 "2021-09-03T09:28:36Z")

</div>

@bencash - as an alternative to line continuation characters, I’ve been using [family triggering](https://metomi.github.io/rose/2019.01.2/html/tutorial/cylc/furthertopics/family-triggers.html) for this type of thing.  
Bit more boilerplate, but:

- less prone to horrible-to-debug issues from stray whitespaces after any line continuation chars!
- IMO makes the graph much more readable for intent (if you have a [sensibly-named](https://martinfowler.com/bliki/TwoHardThings.html) family trigger!)
  - You can help the reader with metadata in the family trigger
  - I’ve come up with ~baroque “naming conventions” for myself on families with different functions, e.g. using `_TRG` suffixes on families used for triggering; mostly to help myself think clearly / cleanly separate purpose

- to help me work out which tasks `XYZ_TRG` actually comprises/triggers, without needing to hunt for tasks it’s inherited in, I’ve found the [`cylc graph --namespaces`](https://cylc.github.io/cylc-doc/stable/html/appendices/command-ref.html#preparation) command super-helpful (see bottom of family triggering tutorial above)

```auto
R1 = """
a => MYGROUP_TRG
"""
[runtime]
[[MYGROUP_TRG]]
   [[[meta]]]
       title = Trigger for mygroup tasks
       description = Trigger family used to handle graphing logic for tasks related to mygroup
[[b]]
    inherit = FOO, BAR, MYGROUP_TRG
[[c]]
    inherit = BAZ, QUX, MYGROUP_TRG
# etc

```

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [September 24, 2021, 2:42am UTC](https://cylc.discourse.group/t/cylc-8b2-graphparseerror/374/5 "2021-09-24T02:42:00Z")

</div>

(A small update to this topic: upcoming Cylc 8 releases will feature graph line continuation on `&` and `|` as well as `=>`)
