I have a task that runs every 6 hours. At times 00Z and 12Z, I want it to have a 2-hour clock offset. At times 06Z and 18Z, I want it to have a 1.5-hour clock offset. Other than that, the task is identical (i.e. same task script, same resources required, etc.). All offsets are to make the task run prior to the cycle point wallclock, but that won’t strictly matter for this example. When I set up a suite that looks like:
[cylc] UTC mode = True [scheduling] initial cycle point = now [[xtriggers]] clock_synoptic = wall_clock(-PT2H) clock_offtime = wall_clock(-PT1H30M) [[dependencies]] [[[T00,T12]]] graph = """ @clock_synoptic => foo """ [[[T06,T18]]] graph = """ @clock_offtime => foo """
I get an error (when turning on debug options) along the lines of:
Traceback (most recent call last): File "/users/whitcomb/working_copies/cylc-working/bin/cylc-validate", line 153, in <module> main() File "/users/whitcomb/working_copies/cylc-working/bin/cylc-validate", line 90, in main output_fname=options.output, mem_log_func=profiler.log_memory) File "/users/whitcomb/working_copies/cylc-working/lib/cylc/config.py", line 558, in __init__ self.load_graph() File "/users/whitcomb/working_copies/cylc-working/lib/cylc/config.py", line 2127, in load_graph old_xtrig.func_kwargs['offset']) KeyError: 'offset'
While looking through the code to track this down, several questions arose:
(minor) Is it valid to not use keyword arguments for the
wall_clockbuiltin xtrigger? The user manual says that it’s fine, but the checks in config.py (in
load_graph) are explicitly looking only for an
offsetkeyword argument and never checking for positional arguments (and in fact set an offset of zero when comparing with another clock trigger if keyword arguments are not used)
(major) From looking at the code, it seems like the error is coming from the second portion of the graph being parsed and the task
foochecking for other clock triggers, and resetting the clock trigger to be the one with the larger offset. The error had to do with the absence of keyword args, but it looks like the intended behavior (even if that’s fixed) is not what I want here. Am I correct in that task
fooin the above example will have its clock trigger over-ridden when the second part of the graph is parsed and that I can’t have different clock xtriggers for the same task in different (non-overlapping) cycles?