# Family graph question

**URL:** <https://cylc.discourse.group/t/family-graph-question/147>\
**Category:** Cylc Support\
**Created:** [September 19, 2019, 2:37pm UTC](https://cylc.discourse.group/t/family-graph-question/147 "2019-09-19T14:37:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jim/32/60_2.png) [@Jim](https://cylc.discourse.group/u/Jim)\
**Post date:** [September 19, 2019, 2:37pm UTC](https://cylc.discourse.group/t/family-graph-question/147/1 "2019-09-19T14:37:06Z")

</div>

I have a graph

```auto
      graph = """
        st_archive<member>[-P1W] => get_data => build_model => run<member> 
        run<member>:finish => st_archive<member> => postprocess<member> => dispose<member>
             """

```

But I need to wait for all of the members to finish before the dispose step. So I think I want to introduce a family

```auto
      graph = """
        st_archive<member>[-P1W] => get_data => build_model => run_family:finish-all =>	dispose
        run<member>:finish => st_archive<member> => postprocess<member>
             """
[runtime]
  [[run<member>]]
    inherit = run_family
  [[run_family]]
      ...

```

but I guess I don’t have it right. I also tried adding a third line to the graph

```auto
run_family:finish-all => dispose

```

but that doesn’t seem to work either. In both cases I don’t seem to execute the dispose step. What am I missing?

---

<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 20, 2019, 4:51am UTC](https://cylc.discourse.group/t/family-graph-question/147/2 "2019-09-20T04:51:55Z")

</div>

Hi Jim,

If `dispose` is a single task that should run after all `run` members have finished, you can do it with or without a family:

```auto
run<member>:finish => dispose

```

or

```auto
run_family:finish-all => dispose

```

same result.

> I also tried adding a third line to the graph …

That won’t make any difference because it just defines the same dependencies that you already have in the first line.

To understand what’s going on, try reducing the number of members and running your suite in dummy mode (it’s usually much quicker than using your real tasks, assuming you are using real tasks at this stage). Are there any error messages in the suite log? Can you click on the `dispose` task to view its prerequisites and see why it didn’t run (or use `cylc show SUITE dispose.<cycle-point>` to see the same) - some prerequisite must not be met, if it does not run.

---

<div class="post-metadata">

**Author:** ![Jim](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jim/32/60_2.png) [@Jim](https://cylc.discourse.group/u/Jim)\
**Post date:** [September 20, 2019, 12:01pm UTC](https://cylc.discourse.group/t/family-graph-question/147/3 "2019-09-20T12:01:13Z")

</div>

Yes, it’s working now. I’m not sure why I didn’t see the dispose step the first time I tried it, perhaps because I was trying to update a running suite? I saw it after I stopped and restarted.

---

<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 22, 2019, 5:40am UTC](https://cylc.discourse.group/t/family-graph-question/147/4 "2019-09-22T05:40:54Z")

</div>

OK, good that it’s working.

Updating a running suite with `cylc reload` can be tricky if you are adding tasks to the workflow graph (in case you did that). Cylc does not automatically add such “new tasks” into a running workflow because it’s difficult to know which cycle point the new tasks should start at. So it’s up to the user to get the ball rolling by using `cylc insert` to put the first instance of a new task into the task pool.
