# Different task configuration at different cycle points?

**URL:** <https://cylc.discourse.group/t/different-task-configuration-at-different-cycle-points/191>\
**Category:** Cylc Support\
**Created:** [January 7, 2020, 11:46pm UTC](https://cylc.discourse.group/t/different-task-configuration-at-different-cycle-points/191 "2020-01-07T23:46:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomC](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/tomc/32/115_2.png) [@TomC](https://cylc.discourse.group/u/TomC)\
**Post date:** [January 7, 2020, 11:46pm UTC](https://cylc.discourse.group/t/different-task-configuration-at-different-cycle-points/191/1 "2020-01-07T23:46:24Z")

</div>

I was wondering if it is possible to have a different task configuration at different cycle points? For example, say it is known that when you run your 06Z cycle, the infrastructure is very busy, so you want to use less nodes, so at 06Z you want a different configuration to be used.

```auto
    [[[task / T06]]]
         [[[job]]]
             execution time limit = PT90M
         [[[directives]]]
            -l select=1:ncpus=1:mem=5G

    [[[task ! T06]]]
         [[[job]]]
             execution time limit = PT30M
         [[[directives]]]
            -l select=1:ncpus=5:mem=25G

```

Or, perhaps you want to run multiple cycles at once, but the earlier cycles don’t run as long or need as many resources

```auto
    [[[task ! $]]]
         [[[job]]]
             execution time limit = PT90M
         [[[directives]]]
            -l select=1:ncpus=1:mem=5G

    [[[task/$]]]
         [[[job]]]
             execution time limit = PT30M
         [[[directives]]]
            -l select=1:ncpus=5:mem=25G

```

From my experimentation, I don’t believe this is doable, but would it be something the Cylc team would consider adding? Or it could be in the subsections (e.g. `[[[job ! $]]]`, `[[[directives / $]]]`)?

The second use case is the one I’m wanting to accomplish at the moment.

---

<div class="post-metadata">

**Author:** ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)\
**Post date:** [January 8, 2020, 12:19am UTC](https://cylc.discourse.group/t/different-task-configuration-at-different-cycle-points/191/2 "2020-01-08T00:19:27Z")

</div>

Hello,

Cylc doesn’t allow dynamic task configurations, this is because Cylc phillosopy is to keep the scheduling and configuration components of a workflow separated (into `[scheduling]` and `[runtime]` respectively).

The problem can be solved in the scheduling section:

```ini
[scheduling]
    initial cycle point = 1
    final cycle point = 3
    cycling mode = integer
    [[dependencies]]
        [[[P1]]]
            graph = """
                d[-P1] => a => b
                c => d
            """
        [[[P1!$]]]
            graph = """
                b => task => c
            """
        [[[R1/$]]]
            graph = """
                b => task_long => c
            """

```

There is a little duplication but the solution is flexible and explicit.

---

<div class="post-metadata">

**Author:** ![TomC](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/tomc/32/115_2.png) [@TomC](https://cylc.discourse.group/u/TomC)\
**Post date:** [January 8, 2020, 12:35am UTC](https://cylc.discourse.group/t/different-task-configuration-at-different-cycle-points/191/3 "2020-01-08T00:35:00Z")

</div>

Yes, that is the approach I’ve had to adopt. It just adds complexity to the graph section, which, when dealing with large and already complex NWP graphs, can make it harder to follow. I felt that allowing more flexibility in the runtime area would lead to a cleaner result.

---

<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:** [January 12, 2020, 8:47pm UTC](https://cylc.discourse.group/t/different-task-configuration-at-different-cycle-points/191/4 "2020-01-12T20:47:27Z")

</div>

> [@TomC](#):
>
> It just adds complexity to the graph section,

IMO that’s arguable - it seems a clean and explicit solution to me: two abstract tasks are used to represent the two different behaviours at different cycles, and under `[runtime]` all the common settings are inherited, so there doesn’t need to be any duplication at all. And the abstract task names can be chosen to make it clear what is happening by merely inspecting the graph (i.e. that the two tasks are actually variants of the same task - e.g. `model-5G` and `model-25G` or whatever).

Hilary

---

<div class="post-metadata">

**Author:** ![TomekTrzeciak](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/tomektrzeciak/32/45_2.png) [@TomekTrzeciak](https://cylc.discourse.group/u/TomekTrzeciak)\
**Post date:** [January 14, 2020, 1:01am UTC](https://cylc.discourse.group/t/different-task-configuration-at-different-cycle-points/191/5 "2020-01-14T01:01:13Z")

</div>

> <https://github.com/cylc/cylc-flow/issues/2415>
>
> Runtime configuration of a task (especially resource requirements such as settings in the \[\[\[directives\]\]\] section) may need to change in different...
