Why cylc graph does not show Family Task

Hi

I am trying to replicate above workflow with cylc. Here /main is the family or module container, which contains other tasks. In BuildDates, we make ascii file contains one date per record…generated from start/end date given by user. Then we pick up top record of this file, run /gemmach for that date, delete top record. pick up next date and repeat for all dates.
I just started learning about Family task in cylc. Appreciate any help, in simulating above workflow in cylc.
cylc graph . …does not show MAIN. I was expecting, it will show MAIN as rectangle with tasks inside.

[scheduler]
  allow implicit tasks = True

[task parameters]
  num = 1..3

[scheduling]
  initial cycle point = 20190211T00             # STARTDATE=2017071700 (UTC)
  final cycle point = 20190211T00               # ENDDATE=2017072000
  [[graph]]
#   R/P1D = """
    R1 = """
#   MAIN:succeed-all => prep_settings
    BuildDates => Launch => Next  => prep_settings
    """

[runtime]
# root is special family task, which is run by all tasks; define variables here at very top level
 [[root]]
  [[[environment ]]]
    root_variable = 000
# Family tasks are named in capital letters. [root] family task is exception, and it is run by all tasks
 [[MAIN]]
  script = """ echo "I am in MAIN family var=$var" """
   [[[environment ]]]
     var = 999
#
   [[BuildDates]]
   inherit = MAIN
   script = """  echo " I am in BuildDates task var=$var var2=$var2 " """
    [[[environment ]]]
     var = 888
     var2 = 777
#
   [[Launch]]
   inherit = MAIN
   script = """  echo " I am in Launch task var=$var var2=$var2 " """
    [[[environment ]]]
     var = 666
     var2 = 444
#
   [[Next]]
   inherit = MAIN
   script = """  echo " I am in Launch task var=$var var2=$var2 " """
    [[[environment ]]]
     var = 333
     var2 = 222
   [[prep_settings]]
   script = """  echo " I am in prep_settings task var=$var var2=$var2 " """
    [[[environment ]]]
     var = 199
     var2 = 188

Hi @bpabla50

Task families in Cylc are not themselves tasks, they just contain common configuration that tasks (family members) inherit. So the script defined in your MAIN family will never run because the inheriting tasks all override it (you probably understand that already, just pointing it out in case it’s not obvious).

Now, because families are not tasks, they don’t appear in the task dependency graph (they just contribute to the configuration of tasks that do appear).

In principle we could draw a family-named box around member tasks, but we just haven’t implemented that. However, we can tell cylc graph to draw the family inheritance graph (instead of dependencies) or to replace family members with a family node in the dependency graph (i.e. to “group” or collapse families).

For your example:

Plain dependency graph - cylc graph:
foo-plain

Dependency graph with the MAIN family grouped - cylc graph -g MAIN (not very interesting because you have one family with almost all tasks in it; and the upper arrow indicates there are internal dependencies amoung family members):

Runtime namespace graph (cylc graph -n)

Note also cylc list can show the (first-parent) inheritance hierarchy in the terminal:

$ cylc list -bt .
root
 ├─MAIN
 │ ├─BuildDates
 │ ├─Launch
 │ └─Next
 └─prep_settings