Family graph question

I have a graph

      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

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

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

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?

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:

run<member>:finish => dispose


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.

1 Like

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.

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.