@@ -50,38 +50,23 @@ Monolithic Or Interdependent Workflows
50
50
When writing workflows from scratch you may need to decide between putting
51
51
multiple loosely connected sub-workflows into a single large workflow, or
52
52
constructing a more modular system of smaller workflows that depend on each other
53
- through inter-workflow triggering. Each approach has its pros and cons, depending
54
- on your requirements and preferences with respect to the complexity and
55
- manageability of the resulting system.
56
-
57
- Inter-Workflow Triggering
58
- ^^^^^^^^^^^^^^^^^^^^^^^^^
59
-
60
- A task in one workflow can explicitly trigger off of a task in another workflow. The
61
- full range of possible triggering conditions is supported, including custom
62
- message triggers. Remote triggering involves repeatedly querying ("polling")
63
- the remote workflow run database, not the :term: `scheduler `, so it works even
64
- if the other workflow is down at the time.
65
-
66
- There is special graph syntax to support triggering off of a task in another
67
- workflow, or you can call the underlying ``cylc workflow-state `` command
68
- directly in task scripting.
69
-
70
- In real time workflows you may want to use clock-triggers to delay the onset of
71
- inter-workflow polling until roughly the expected completion time of the remote
72
- task.
53
+ through :ref: `inter-workflow triggering <Built-in Workflow State Triggers >`.
54
+ Each approach has its pros and cons, depending on your requirements and
55
+ preferences with respect to the complexity and manageability of the resulting
56
+ system.
73
57
74
58
75
59
.. _Self-Contained Workflows :
76
60
77
61
Self-Contained Workflows
78
62
------------------------
79
63
80
- All files generated by Cylc during a workflow run are confined to the *workflow
81
- run directory * ``$HOME/cylc-run/<workflow-name> ``. However, Cylc has no control
82
- over the locations of the programs, scripts, and files, that are executed,
83
- read, or generated by your tasks at runtime. It is up to you to ensure that
84
- all of this is confined to the run directory too, as far as possible.
64
+ All files generated by Cylc during a workflow run are confined to the workflow
65
+ :term: `run directory ` ``$HOME/cylc-run/<workflow-id> ``. However, Cylc has no
66
+ control over the locations of the programs, scripts, and files, that are
67
+ executed, read, or generated by your tasks at runtime. It is up to you to
68
+ ensure that all of this is confined to the run directory too, as far as
69
+ possible.
85
70
86
71
Self-contained workflows are more robust, easier to work with, and more portable.
87
72
Multiple instances of the same workflow (with different workflow names) should be
@@ -148,19 +133,16 @@ to copy or move selected files to external locations as needed (see
148
133
Task Host Selection
149
134
-------------------
150
135
151
- At sites with multiple task hosts to choose from, use
152
- ``rose host-select `` to dynamically select appropriate task hosts
153
- rather than hard coding particular hostnames. This enables your workflow to
154
- adapt to particular machines being down or heavily overloaded by selecting
155
- from a group of hosts based on a series of criteria.
156
- ``rose host-select `` will only return hosts that can be contacted by
157
- non-interactive SSH.
136
+ The ``rose host-select `` command is now deprecated. Workflows should migrate
137
+ to using :term: `platforms <platform> ` which provide a more efficient
138
+ solution.
139
+ See :ref: `MajorChangesPlatforms ` for details.
158
140
159
141
160
142
Task Scripting
161
143
--------------
162
144
163
- Non-trivial task scripting should be held in external files rather than
145
+ Non-trivial task scripting should be held in separate script files rather than
164
146
inlined in :cylc:conf: `flow.cylc `. This keeps the workflow definition tidy, and it
165
147
allows proper shell-mode text editing and independent testing of task scripts.
166
148
@@ -274,29 +256,34 @@ development and testing.
274
256
Clock-Triggered Tasks
275
257
---------------------
276
258
277
- Tasks that wait on real time data should use clock-triggers to delay job
278
- submission until the expected data arrival time:
259
+ Tasks that wait on real time data should use
260
+ :ref: `clock triggers <Built-in Clock Triggers >`
261
+ to delay job submission until the expected data arrival time:
279
262
280
263
.. code-block :: cylc
281
264
282
265
[scheduling]
283
266
initial cycle point = now
284
- [[special tasks ]]
267
+ [[xtriggers ]]
285
268
# Trigger 5 min after wallclock time is equal to cycle point.
286
- clock-trigger = get-data( PT5M)
269
+ clock = wall_clock(offset= PT5M)
287
270
[[graph]]
288
- T00 = get-data => process-data
271
+ T00 = @clock => get-data => process-data
272
+
273
+ .. cylc-scope :: flow.cylc[runtime][<namespace>]
289
274
290
275
Clock-triggered tasks typically have to handle late data arrival. Task
291
- execution *retry delays * can be used to simply retrigger the task at
292
- intervals until the data is found, but frequently retrying small tasks probably
293
- should not go to a :term: `job runner `, and multiple task failures will be logged
294
- for what is a essentially a normal condition (at least it is normal until the
295
- data is really late).
276
+ :cylc:conf: `execution retry delays ` can be used to simply retrigger
277
+ the task at intervals until the data is found, but frequently retrying small
278
+ tasks is inefficient, and multiple task
279
+ failures will be logged for what is a essentially a normal condition (at least
280
+ it is normal until the data is really late).
281
+
282
+ .. cylc-scope ::
296
283
297
284
Rather than using task execution retry delays to repeatedly trigger a task that
298
285
checks for a file, it may be better to have the task itself repeatedly poll for
299
- the data (see :ref: `Rose App File Polling ` for example ).
286
+ the data (see :ref: `Custom Trigger Functions ` ).
300
287
301
288
302
289
.. _Rose App File Polling :
@@ -318,7 +305,8 @@ Task Execution Time Limits
318
305
--------------------------
319
306
320
307
Instead of setting job wallclock limits directly in :term: `job runner `
321
- directives, use the ``execution time limit `` workflow config item.
308
+ directives, use
309
+ :cylc:conf: `flow.cylc[runtime][<namespace>]execution time limit `.
322
310
Cylc automatically derives the correct job runner directives from this,
323
311
and it is also used to run ``background `` and ``at `` jobs via
324
312
the ``timeout `` command, and to poll tasks that haven't reported in
0 commit comments