Skip to content

Commit d31a69c

Browse files
Merge pull request #528 from oliver-sanders/task-job
Task job
2 parents abf960d + 8c16c2a commit d31a69c

22 files changed

+122
-150
lines changed

src/7-to-8/major-changes/platforms.rst

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,11 @@ Platforms
66
.. admonition:: Does This Change Affect Me?
77
:class: tip
88

9-
.. cylc-scope:: flow.cylc
9+
Cylc platforms are a new feature which replace the task ``job`` and
10+
``remote`` configuration sections:
1011

11-
Platforms replace the deprecated :cylc:conf:`[runtime][<namespace>][job]`
12-
and :cylc:conf:`[runtime][<namespace>][remote]`
13-
sections:
14-
15-
.. code-block:: cylc
16-
17-
[runtime]
18-
[[foo]]
19-
[[[job]]]
20-
batch system = slurm
21-
[[[remote]]]
22-
host = my_supercomputer
23-
24-
.. cylc-scope::
25-
26-
Read this section if your workflow's jobs run on a remote computer or if
27-
you see the following warning on running ``cylc validate``:
28-
29-
.. code-block:: console
30-
31-
WARNING - deprecated settings found (please replace with [runtime][foo]platform):
32-
[runtime][foo][remote]host
33-
[runtime][foo][job]batch system
34-
35-
If you currently use the ``rose host-select`` utility or a similar host
36-
selection or load balancing utility the intelligent host selection
37-
functionality of Cylc 8 may be used instead:
38-
39-
.. code-block:: cylc
40-
41-
[runtime]
42-
[[task1]]
43-
[[[remote]]]
44-
host = $(rose host-select my-computer)
45-
[[task2]]
46-
# An example of a home-rolled host selector
47-
[[[remote]]]
48-
host = $(test $((RANDOM%2)) -eq 0 && echo "host_a" || echo "host_b")
12+
* :cylc:conf:`[runtime][<namespace>][job]`
13+
* :cylc:conf:`[runtime][<namespace>][remote]`
4914

5015

5116
Overview
@@ -57,23 +22,17 @@ Overview
5722
- The terms :term:`job runner` (in Cylc 8 configurations) and batch system
5823
(in Cylc 7 configurations) are equivalent.
5924

60-
Cylc 7 defines settings for remote :term:`jobs <job>` in each
61-
:term:`task's <task>` definition.
62-
63-
Cylc 8 allows site administrators (and users) to configure
64-
:term:`platforms <platform>` in ``global.cylc``. A platform can have
65-
multiple hosts with associated platform-specific settings. Users only need to
66-
select the platform for their task jobs.
25+
Submitting a job to a :term:`job runner` may require configuration.
6726

68-
Platforms also define how hosts are selected from each platform:
27+
In Cylc 7 this configuration must be provided for each task in the workflow
28+
configuration (``suite.rc``).
6929

70-
- Randomly (default)
71-
- By definition order
30+
In Cylc 8 "platforms" can be defined in the global configuration
31+
(:cylc:conf:`global.cylc`) so that this configuration doesn't have to be
32+
repeated for each task in each workflow.
7233

73-
There may be cases where sets of platforms (for example a group of
74-
standalone compute servers, or a pair of mirrored HPC's) might be equally
75-
suitable for a task, but not share files systems to allow them to constitute
76-
a single platform. Such platforms can be set up to be ``platform groups``
34+
Cylc "platforms" may configure hostnames, job runners and more. Only the
35+
platform name needs to be specified in the task configuration.
7736

7837
.. seealso::
7938

@@ -92,6 +51,20 @@ a single platform. Such platforms can be set up to be ``platform groups``
9251
Deprecated settings will be removed in a later release of Cylc.
9352

9453

54+
What is a Platform?
55+
-------------------
56+
57+
A "platform" represents one or more hosts from which jobs can be submitted to or
58+
polled from a common job submission system.
59+
60+
If a platform has multiple hosts Cylc will automatically select a host when
61+
needed and will fallback to other hosts if it is not contactable.
62+
63+
A "platform group" represents a collection of independent platforms. Cylc will
64+
automatically select a platform and will fallback to other platforms in the
65+
group (for appropriate operations) if the platform is not contactable.
66+
67+
9568
Examples
9669
--------
9770

src/7-to-8/major-changes/task-job-states.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ the submission stage, real job scripts). A task can have multiple jobs, by
1414
automatic retries and manual re-triggering.
1515

1616
Cylc 7 had 13 task/job states. The GUI only showed tasks, with job data
17-
from the latest task job.
17+
from the latest job.
1818

1919
Cylc 8 has only 8 task/job states. The Cylc 8 UI shows both task and jobs.
2020
Task icons are monochrome circles; job icons are coloured squares. The running
2121
task icon incorporates a radial progress indicator.
2222

2323
.. image:: ../../img/task-job.png
24-
:align: center
24+
:align: center

src/7-to-8/summary.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Task/Job States
9797

9898
:term:`Tasks <task>` are nodes in the abstract workflow graph, representing
9999
applications to run at the appropriate point in the workflow. A :term:`job <job>`
100-
(or a *task job*) is the script (and subsequent process) submitted by Cylc to
100+
is the script (and subsequent process) submitted by Cylc to
101101
actually run the application. A task can have multiple jobs as the result of
102102
automatic retries or manual re-triggering.
103103

@@ -146,7 +146,7 @@ Cylc 8 is aware of sets of host settings called
146146

147147
Hosts of a platform must share a file system and :term:`job runner`:
148148
If one host is unavailable Cylc 8 can use other hosts
149-
on the same platform to interact with task jobs.
149+
on the same platform to interact with jobs.
150150

151151
The same hosts can belong to multiple platforms, for example
152152
you might be able to use the same host to launch both background and Slurm
@@ -250,7 +250,7 @@ Queues
250250
Time Zones
251251
:cylc:conf:`[scheduler]cycle point time zone` now defaults to UTC, unless you
252252
are working in :ref:`cylc_7_compat_mode`.
253-
Task Job Scripts
253+
Job Scripts
254254
All user-defined task scripting now runs in a subshell, so you can safely
255255
switch Python environments inside tasks without affecting Cylc.
256256
Further information is available in the User Guide: :ref:`JobScripts`.

src/glossary.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Glossary
136136
The workflow name is a path relative to the cylc-run directory which
137137
contains one or more workflow :term:`run directories <run directory>`.
138138

139-
Task jobs can get the workflow name from ``$CYLC_WORKFLOW_NAME`` in their
139+
Tasks can get the workflow name from ``$CYLC_WORKFLOW_NAME`` in their
140140
runtime environment.
141141

142142
Unlike :term:`workflow id` the name is not always a unique identifier. In
@@ -712,7 +712,7 @@ Glossary
712712
713713
<run-directory>/work/<cycle-point>/<task-name>
714714
715-
Task jobs can get their own work directory path at runtime from
715+
Tasks can get their own work directory path at runtime from
716716
the ``CYLC_TASK_WORK_DIR`` environment variable or the Posix ``pwd``
717717
command.
718718

@@ -731,7 +731,7 @@ Glossary
731731
732732
<run-directory>/share
733733
734-
Task jobs can get their own share directory path at runtime from
734+
Tasks can get their own share directory path at runtime from
735735
the ``CYLC_WORKFLOW_SHARE_DIR`` environment variable.
736736

737737
In cycling workflows files are typically stored in cycle point
@@ -784,7 +784,7 @@ Glossary
784784
<run-directory>/log/job/<cycle-point>/<task-name>/<job-submit-num>
785785
786786
787-
You can print task job logs at the terminal with ``cylc cat-log
787+
You can print job logs at the terminal with ``cylc cat-log
788788
<workflow-name> <task-id>``. By default this prints ``job.out``.
789789
There are command options to select the other logs.
790790

src/installation.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ your ``$PATH``, follow the instructions in the ``brew install`` output.
120120

121121
Newer version of Mac OS set ``zsh`` as the default shell (as opposed to
122122
``bash``). You do not need to change this but be aware that Cylc uses
123-
``bash`` (for task job scripts) which has a subtly different syntax.
123+
``bash`` (for job scripts) which has a subtly different syntax.
124124

125125
.. warning::
126126

@@ -166,7 +166,7 @@ User Machines
166166
Cylc Servers
167167
Where Cylc schedulers run to manage workflows.
168168
Job Hosts
169-
Where task jobs run, e.g. supercomputers or clusters
169+
Where jobs run, e.g. supercomputers or clusters
170170

171171
.. note::
172172

@@ -258,9 +258,9 @@ configuration of the system on both a site and user basis.
258258
Bash Profile
259259
^^^^^^^^^^^^
260260

261-
Cylc task job scripts are bash scripts, which is good for manipulating files
262-
and processes, They invoke ``bash -l`` to allow environment configuration in
263-
login scripts.
261+
Cylc :term:`job scripts <job script>` are bash scripts, which is good for
262+
manipulating files and processes, They invoke ``bash -l`` to allow environment
263+
configuration in login scripts.
264264

265265
.. warning::
266266

src/reference/config/writing-platform-configs.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ What Are Platforms?
4040
Platforms define settings, most importantly:
4141

4242
- A set of ``hosts``.
43-
- A ``job runner`` (formerly a ``batch system``) where Cylc can submit a
44-
task job.
45-
- An ``install target`` for Cylc to install task job files on.
43+
- A ``job runner`` (formerly a ``batch system``) where Cylc can submit a job.
44+
- An ``install target`` for Cylc to install job files on.
4645

4746
Why Were Platforms Introduced?
4847
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/reference/dev-history-major-changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Cylc Development History - Major Changes
3030
- multi-threading for continuous network request handling and job submission
3131
- more task states to distinguish job submission from execution
3232
- dependence between suites via new run databases
33-
- polling and killing of real task jobs
33+
- polling and killing of real jobs
3434
- polling as task communications option
3535

3636
- **cylc-6**

src/reference/job-script-vars/var-list.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CYLC_WORKFLOW_SHARE_DIR # Workflow (or task!) shared directory (see b
2929
CYLC_WORKFLOW_UUID # Workflow UUID string
3030
CYLC_WORKFLOW_WORK_DIR # Workflow work directory (see below)
3131

32-
CYLC_TASK_JOB # Task job identifier expressed as
32+
CYLC_TASK_JOB # Job identifier expressed as
3333
# CYCLE-POINT/TASK-NAME/SUBMIT-NUMBER
3434
# e.g. 20110511T1800Z/t1/01
3535

@@ -50,7 +50,7 @@ CYLC_TASK_FLOW_NUMBERS # Flows this task belongs to, e.g. 1,2
5050

5151
CYLC_TASK_LOG_DIR # Location of the job log directory
5252
# e.g. ~/cylc-run/foo/log/job/20110511T1800Z/t1/01/
53-
CYLC_TASK_LOG_ROOT # The task job file path
53+
CYLC_TASK_LOG_ROOT # The job script path
5454
# e.g. ~/cylc-run/foo/log/job/20110511T1800Z/t1/01/job
5555
CYLC_TASK_WORK_DIR # Location of task work directory (see below)
5656
# e.g. ~/cylc-run/foo/work/20110511T1800Z/t1

src/tutorial/runtime/introduction.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ We can also call other scripts or executables in this way, e.g:
8585

8686
To help with this, Cylc automatically adds a ``bin/`` sub-directory of the
8787
workflow :term:`source directory` to the executable search path (``$PATH``)
88-
in task job environments.
88+
in task environments.
8989

9090
.. code-block:: bash
9191
:caption: bin/hello_world
@@ -131,7 +131,7 @@ Tasks And Jobs
131131
When a :term:`task` is ready to run Cylc creates a :term:`job script` for
132132
it: a bash file containing the scripting defined for the task along with
133133
other configuration and error trapping code. This is what actually executes
134-
as the task job.
134+
as the job.
135135

136136
:term:`Tasks<task>` typically go through the following states as a workflow
137137
runs:
@@ -141,11 +141,11 @@ Tasks And Jobs
141141
Preparing
142142
Dependencies met; preparing the task :term:`job script` for submission.
143143
Submitted
144-
Task job script submitted to the :term:`job runner`; waiting on execution.
144+
Job script submitted to the :term:`job runner`; waiting on execution.
145145
Running
146-
Task job script executing.
146+
Job script executing.
147147
Succeeded
148-
Task job completed successfully (i.e. exited with 0 return status).
148+
Job completed successfully (i.e. exited with 0 return status).
149149

150150
There are several other task states as well, such as **failed**.
151151

@@ -418,14 +418,14 @@ Files Generated at Runtime
418418
read or write files shared with other tasks.
419419
``work/``
420420
Contains task :term:`work directories <work directory>`, i.e. the
421-
*current working directories* of running task jobs. These are
421+
*current working directories* of running tasks. These are
422422
removed automatically if empty when a task finishes.
423423

424424
The job log directory path ends in ``<cycle-point>/<task-name>/<job-submission-num>/``,
425425
where the :term:`job submission number` starts at 1 and increments each time a
426426
task re-runs.
427427

428-
You can use the command line to view scheduler or task job logs without
428+
You can use the command line to view scheduler or job logs without
429429
having to find them yourself on the filesystem:
430430

431431
.. code-block:: bash
@@ -540,7 +540,7 @@ Files Generated at Runtime
540540
.. code-block:: none
541541
542542
Workflow : runtime-introduction
543-
Task Job : 20000101T0000Z/get_observations_heathrow/01 (try 1)
543+
Job : 20000101T0000Z/get_observations_heathrow/01 (try 1)
544544
User@Host: username@hostname
545545
546546
Guessing Weather Conditions

src/tutorial/runtime/runtime-configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Job Submission
5656

5757
.. ifnotslides::
5858

59-
By default Cylc runs :term:`task jobs <job>` on the same machine as
59+
By default Cylc runs :term:`jobs <job>` on the same machine as
6060
the scheduler. It can run them on other machines too if we set the
6161
:term:`platform` like this:
6262

@@ -117,7 +117,7 @@ Time Limits
117117
.. ifnotslides::
118118

119119
We can specify an execution time limit, as an :term:`ISO8601 duration`, after
120-
which a task job will be terminated. Cylc automatically translates this to
120+
which a job will be terminated. Cylc automatically translates this to
121121
the correct :term:`job runner` directives.
122122

123123
.. code-block:: cylc
@@ -131,7 +131,7 @@ Time Limits
131131
Retries
132132
-------
133133

134-
Task jobs can fail for several reasons:
134+
Jobs can fail for several reasons:
135135

136136
.. nextslide::
137137

0 commit comments

Comments
 (0)