Skip to content

Commit eabaef2

Browse files
committed
Revise simulation modes doc.
1 parent f2bfe24 commit eabaef2

File tree

1 file changed

+33
-39
lines changed

1 file changed

+33
-39
lines changed

src/user-guide/running-workflows/simulation-modes.rst

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,66 +3,60 @@
33
Simulating Workflow Behaviour
44
-----------------------------
55

6-
Several workflow run modes allow you to simulate workflow behaviour quickly without
7-
running the workflow's real jobs - which may be long-running and resource-hungry:
6+
Cylc can simulate scheduling without running real task jobs (which may
7+
be long-running and resource-hungry).
88

9-
dummy mode
10-
Runs tasks as background jobs on configured job hosts.
9+
**Dummy mode** replaces real task jobs with background ``sleep`` jobs on the
10+
scheduler host. This avoids :term:`job runner` directives that request compute
11+
resources for real workflow tasks, and it allows any workflow configuration to
12+
run locally in dummy mode.
1113

12-
This simulates scheduling, job host connectivity, and generates all job
13-
files on workflow and job hosts.
14-
dummy-local mode
15-
Runs real tasks as background jobs on the workflow host, which allows
16-
dummy-running workflows from other sites.
17-
18-
This simulates scheduling and generates all job files on the workflow host.
19-
simulation mode
20-
Does not run any real tasks.
14+
.. code-block:: console
2115
22-
This simulates scheduling without generating any job files.
16+
$ cylc play --mode=dummy <workflow-id> # real dummy jobs
2317
24-
Set the run mode (default ``live``) on the command line:
18+
**Simulation mode** does not run real jobs at all.
2519

2620
.. code-block:: console
2721
28-
$ cylc play --mode=dummy <workflow-id>
22+
$ cylc play --mode=simulation <workflow-id> # no real jobs
2923
30-
You can get specified tasks to fail in these modes, for more flexible workflow
31-
testing. See :cylc:conf:`[runtime][<namespace>][simulation]`.
3224
25+
Simulated Run Length
26+
^^^^^^^^^^^^^^^^^^^^
3327

34-
Proportional Simulated Run Length
35-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28+
The default dummy or simulated task job run length is 10 seconds. It can be
29+
changed with :cylc:conf:`[runtime][<namespace>][simulation]default run length`.
3630

37-
If :cylc:conf:`[runtime][<namespace>]execution time limit` is set, Cylc
38-
divides it by :cylc:conf:`[runtime][<namespace>][simulation]speedup factor` to compute simulated task
39-
run lengths.
31+
If :cylc:conf:`[runtime][<namespace>]execution time limit` and
32+
:cylc:conf:`[runtime][<namespace>][simulation]speedup factor` are both set,
33+
run length is computed by dividing the time limit by the speedup factor.
4034

4135

42-
Limitations Of Workflow Simulation
36+
Limitations of Workflow Simulation
4337
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4438

45-
Dummy mode ignores :term:`job runner` settings because Cylc does not know which
46-
job resource directives (requested memory, number of compute nodes, etc.) would
47-
need to be changed for the dummy jobs. If you need to dummy-run jobs on a
48-
job runner, manually comment out ``script`` items and modify
49-
directives in your live workflow, or else use a custom live mode test workflow.
39+
Dummy tasks run locally, so dummy mode does not test communication with remote
40+
job platforms. However, it is easy to write a live-mode test workflow with
41+
simple ``sleep 10`` tasks that submit to a remote platform.
42+
43+
Alternate path branching is difficult to simulate effectively. You can
44+
configure certain tasks to fail via
45+
:cylc:conf:`[runtime][<namespace>][simulation]`, but all branches based
46+
on mutually exclusive custom outputs will run because custom outputs get
47+
artificially completed in dummy and simulation mode.
5048

5149
.. note::
5250

53-
The dummy modes ignore all configured task ``script`` items
54-
including ``init-script``. If your ``init-script`` is required
55-
to run even blank/empty tasks on a job host, note that host environment
56-
setup should be done elsewhere.
51+
All configured task ``script`` items including ``init-script`` are ignored
52+
in dummy mode. If your ``init-script`` is required to run even local dummy
53+
jobs, the relevant environment setup should be done elsewhere.
5754

5855

5956
Restarting Workflows With A Different Run Mode?
6057
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6158

62-
The run mode is recorded in the workflow run database files. Cylc will not let
63-
you *restart* a non-live mode workflow in live mode, or vice versa. To
64-
test a live workflow in simulation mode just take a quick copy of it and run the
65-
the copy in simulation mode.
66-
67-
59+
Run mode is recorded in the workflow run database. Cylc will not let you
60+
*restart* a dummy mode workflow in live mode, or vice versa. To do that,
61+
install a new instance of the workflow and run it from scratch in the new mode.
6862

0 commit comments

Comments
 (0)