Skip to content

Commit

Permalink
terms: settle on "task" and "job" but not "task job"
Browse files Browse the repository at this point in the history
* Retire "task job" as a user-facing term in favour of the canonical
  "task" and "job" terms.
* Closes cylc/cylc-doc#352
* The ID structure is `workflow//cycle/task/job`, they are tasks and jobs
  not "task-jobs" or "cycle-tasks" or "workflow-cycles".
  • Loading branch information
oliver-sanders committed Aug 25, 2022
1 parent ba06b80 commit 53f13aa
Show file tree
Hide file tree
Showing 32 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**See the [Cylc installation guide](https://cylc.github.io/cylc-doc/stable/html/installation.html)
for more detailed information.**

Cylc must be installed on workflow and task job hosts. Third-party dependencies
Cylc must be installed on workflow and job hosts. Third-party dependencies
are not required on job hosts.

## Cylc 7
Expand Down
8 changes: 4 additions & 4 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
- slurm_packjob
- moab
Directives are written to the top of the task job script in the correct format
Directives are written to the top of the job script in the correct format
for the job runner.
Specifying directives individually like this allows use of default directives
Expand Down Expand Up @@ -1082,7 +1082,7 @@ def default_for(
A platform consists of a group of one or more hosts which share a
file system and a job runner (batch system).
A platform must allow interaction with the same task job from *any*
A platform must allow interaction with the same job from *any*
of its hosts.
.. versionadded:: 8.0.0
Expand Down Expand Up @@ -1535,7 +1535,7 @@ def default_for(
We recommend using a clean job submission environment for
consistent handling of local and remote jobs. However,
this is not the default behavior because it prevents
local task jobs from running, unless ``$PATH`` contains the
local jobs from running, unless ``$PATH`` contains the
``cylc`` wrapper script.
Specific environment variables can be singled out to pass
Expand Down Expand Up @@ -1655,7 +1655,7 @@ def default_for(
all be suitable for a given job.
When Cylc sets up a task job it will pick a platform from a group.
When Cylc submits a job it will pick a platform from a group.
Cylc will then use the selected platform for all interactions with
that job.
Expand Down
28 changes: 14 additions & 14 deletions cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
If no parents are listed default is ``root``.
''')
Conf('script', VDR.V_STRING, desc=dedent('''
The main custom script run from the task job script.
The main custom script run from the job script.
It can be an external command or script, or inlined scripting.
Expand All @@ -980,7 +980,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
this='script', example='my_script.sh'
))
Conf('init-script', VDR.V_STRING, desc=dedent('''
Custom script run by the task job script before the task
Custom script run by the job script before the task
execution environment is configured.
By running before the task execution environment is configured,
Expand All @@ -992,7 +992,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
this should no longer be necessary.
''') + get_script_common_text(this='init-script'))
Conf('env-script', VDR.V_STRING, desc=dedent('''
Custom script run by the task job script between the
Custom script run by the job script between the
cylc-defined environment (workflow and task identity, etc.) and
the user-defined task runtime environment.
Expand All @@ -1001,10 +1001,10 @@ def get_script_common_text(this: str, example: Optional[str] = None):
It can be an external command or script, or inlined scripting.
''') + get_script_common_text(this='env-script'))
Conf('err-script', VDR.V_STRING, desc=('''
Script run when a task job error is detected.
Script run when a job error is detected.
Custom script to be run at the end of the error trap,
which is triggered due to failure of a command in the task job
which is triggered due to failure of a command in the job
script or trappable job kill.
The output of this script will always
Expand All @@ -1029,7 +1029,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
this='exit-script', example='rm -f "$TMP_FILES"'
))
Conf('pre-script', VDR.V_STRING, desc=dedent('''
Custom script run by the task job script immediately
Custom script run by the job script immediately
before :cylc:conf:`[..]script`.
The pre-script can be an external command or script, or
Expand All @@ -1039,7 +1039,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
example='echo "Hello from workflow ${CYLC_WORKFLOW_ID}!"'
))
Conf('post-script', VDR.V_STRING, desc=dedent('''
Custom script run by the task job script immediately
Custom script run by the job script immediately
after :cylc:conf:`[..]script`.
The post-script can be an external
Expand All @@ -1049,7 +1049,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
Conf('work sub-directory', VDR.V_STRING, desc='''
The directory from which tasks are executed.
Task job scripts are executed from within *work directories*
Job scripts are executed from within *work directories*
created automatically under the workflow run directory. A task
can get its own work directory from ``$CYLC_TASK_WORK_DIR``
(or ``$PWD`` if it does not ``cd`` elsewhere at
Expand Down Expand Up @@ -1083,13 +1083,13 @@ def get_script_common_text(this: str, example: Optional[str] = None):
)
)
Conf('execution retry delays', VDR.V_INTERVAL_LIST, None, desc=f'''
Cylc can automate resubmission of a failed task job.
Cylc can automate resubmission of a failed job.
Execution retry delays are a list of ISO 8601
durations/intervals which tell Cylc how long to wait before
resubmitting a failed job.
Each time Cylc resubmits a task job it will increment the
Each time Cylc resubmits a job it will increment the
variable ``$CYLC_TASK_TRY_NUMBER`` in the task execution
environment. ``$CYLC_TASK_TRY_NUMBER`` allows you to vary task
behavior between submission attempts.
Expand All @@ -1101,13 +1101,13 @@ def get_script_common_text(this: str, example: Optional[str] = None):
''')
Conf('execution time limit', VDR.V_INTERVAL, desc=f'''
Set the execution (:term:`wallclock <wallclock time>`) time
limit of a task job.
limit of a job.
For ``background`` and ``at`` job runners Cylc runs the
job's script using the timeout command. For other job runners
Cylc will convert execution time limit to a :term:`directive`.
If a task job exceeds its execution time limit Cylc can
If a job exceeds its execution time limit Cylc can
poll the job multiple times. You can set polling
intervals using :cylc:conf:`global.cylc[platforms]
[<platform name>]execution time limit polling intervals`
Expand Down Expand Up @@ -1573,7 +1573,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
The user defined task execution environment.
Variables defined here can refer to cylc workflow and task
identity variables, which are exported earlier in the task job
identity variables, which are exported earlier in the job
script. Variable assignment expressions can use cylc
utility commands because access to cylc is also configured
earlier in the script.
Expand All @@ -1591,7 +1591,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
The order of definition is preserved that each variable can
refer to previously defined
variables. Values are passed through to the task job
variables. Values are passed through to the job
script without evaluation or manipulation by Cylc
(with the exception of valid Python string templates
that match parameterized task names - see below), so any
Expand Down
10 changes: 5 additions & 5 deletions cylc/flow/etc/job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

###############################################################################
# Bash functions for a cylc task job.
# Bash functions for a cylc job.
###############################################################################

###############################################################################
# The main function for a cylc task job.
# The main function for a cylc job.
cylc__job__main() {
# Export CYLC_ workflow and task environment variables
cylc__job__inst__cylc_env
Expand All @@ -50,7 +50,7 @@ cylc__job__main() {
trap "cylc__job_vacation ${signal_name}" "${signal_name}"
done
set -euo pipefail
# Write task job self-identify
# Write job self-identify
USER="${USER:-$(whoami)}"
typeset host="${HOSTNAME:-}"
if [[ -z "${host}" ]]; then
Expand All @@ -65,7 +65,7 @@ cylc__job__main() {
# We were using a HERE document for writing info here until we notice that
# Bash uses temporary files for HERE documents, which can be inefficient.
echo "Workflow : ${CYLC_WORKFLOW_ID}"
echo "Task Job : ${CYLC_TASK_JOB} (try ${CYLC_TASK_TRY_NUMBER})"
echo "Job : ${CYLC_TASK_JOB} (try ${CYLC_TASK_TRY_NUMBER})"
echo "User@Host: ${USER}@${host}"
echo
# Derived environment variables
Expand Down Expand Up @@ -229,7 +229,7 @@ cylc__job__poll_grep_workflow_log() {
}

###############################################################################
# Run a function in the task job instance file, if possible.
# Run a function in the job instance file, if possible.
# Arguments:
# func_name: name of function without the "cylc__job__inst__" prefix
# Returns:
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/hostuserutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def get_host(self):
As specified by the "[scheduler][host self-identification]" settings in
the site/user global.cylc files. This is mainly used for workflow host
identification by task jobs.
identification by tasks.
"""
if self._host is None:
Expand Down
6 changes: 3 additions & 3 deletions cylc/flow/job_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Write task job files."""
"""Write job files."""

from contextlib import suppress
import os
Expand All @@ -31,7 +31,7 @@

class JobFileWriter:

"""Write task job files."""
"""Write job files."""

def __init__(self):
self.workflow_env = {}
Expand Down Expand Up @@ -120,7 +120,7 @@ def _check_script_value(value):
def _write_header(handle, job_conf):
"""Write job script header."""
handle.write("#!/bin/bash -l\n")
handle.write("#\n# ++++ THIS IS A CYLC TASK JOB SCRIPT ++++")
handle.write("#\n# ++++ THIS IS A CYLC JOB SCRIPT ++++")
for prefix, value in [
("# Workflow: ", job_conf['workflow_name']),
("# Task: ", job_conf['task_id']),
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/job_runner_handlers/at.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Submits task job scripts to the rudimentary Unix ``at`` scheduler.
"""Submits job scripts to the rudimentary Unix ``at`` scheduler.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/job_runner_handlers/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Runs task job scripts as Unix background processes.
"""Runs job scripts as Unix background processes.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/job_runner_handlers/loadleveler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Submits task job scripts to loadleveler by the ``llsubmit`` command.
"""Submits job scripts to loadleveler by the ``llsubmit`` command.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand All @@ -37,7 +37,7 @@
foo = bar
baz = qux
These are written to the top of the task job script like this:
These are written to the top of the job script like this:
.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/job_runner_handlers/lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Submits task job scripts to IBM Platform LSF by the ``bsub`` command.
"""Submits job scripts to IBM Platform LSF by the ``bsub`` command.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand All @@ -36,7 +36,7 @@
[[[directives]]]
-q = foo
These are written to the top of the task job script like this:
These are written to the top of the job script like this:
.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/job_runner_handlers/moab.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Submits task job scripts to the Moab workload manager with ``msub``.
"""Submits job scripts to the Moab workload manager with ``msub``.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand All @@ -39,7 +39,7 @@
-q = foo
-l nodes = 1
These are written to the top of the task job script like this:
These are written to the top of the job script like this:
.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/job_runner_handlers/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Submits task job scripts to PBS (or Torque) by the ``qsub`` command.
"""Submits job scripts to PBS (or Torque) by the ``qsub`` command.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand All @@ -38,7 +38,7 @@
-q = foo
-l nodes = 1
These are written to the top of the task job script like this:
These are written to the top of the job script like this:
.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/job_runner_handlers/sge.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Submits task job scripts to Sun/Oracle Grid Engine with ``qsub``.
"""Submits job scripts to Sun/Oracle Grid Engine with ``qsub``.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand All @@ -39,7 +39,7 @@
-l h_data = 1024M
-l h_rt = 24:00:00
These are written to the top of the task job script like this:
These are written to the top of the job script like this:
.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/job_runner_handlers/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Submits task job scripts to Simple Linux Utility for Resource Management.
"""Submits job scripts to Simple Linux Utility for Resource Management.
.. cylc-scope:: flow.cylc[runtime][<namespace>]
Expand Down Expand Up @@ -43,7 +43,7 @@
Since not all SLURM commands have a short form, cylc requires
the long form directives.
These are written to the top of the task job script like this:
These are written to the top of the job script like this:
.. code-block:: bash
Expand Down
6 changes: 3 additions & 3 deletions cylc/flow/job_runner_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def jobs_kill(self, job_log_root, job_log_dirs):
"""Kill multiple jobs.
job_log_root -- The log/job/ sub-directory of the workflow.
job_log_dirs -- A list containing point/name/submit_num for task jobs.
job_log_dirs -- A list containing point/name/submit_num for jobs.
"""
# Note: The more efficient way to do this is to group the jobs by their
Expand Down Expand Up @@ -311,7 +311,7 @@ def jobs_poll(self, job_log_root, job_log_dirs):
"""Poll multiple jobs.
job_log_root -- The log/job/ sub-directory of the workflow.
job_log_dirs -- A list containing point/name/submit_num for task jobs.
job_log_dirs -- A list containing point/name/submit_num for jobs.
"""
if "$" in job_log_root:
Expand Down Expand Up @@ -368,7 +368,7 @@ def jobs_submit(self, job_log_root, job_log_dirs, remote_mode=False,
"""Submit multiple jobs.
job_log_root -- The log/job/ sub-directory of the workflow.
job_log_dirs -- A list containing point/name/submit_num for task jobs.
job_log_dirs -- A list containing point/name/submit_num for jobs.
remote_mode -- am I running on the remote job host?
utc_mode -- is the workflow running in UTC mode?
Expand Down
Loading

0 comments on commit 53f13aa

Please sign in to comment.