|
3 | 3 | Simulating Workflow Behaviour
|
4 | 4 | -----------------------------
|
5 | 5 |
|
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). |
8 | 8 |
|
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. |
11 | 13 |
|
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 |
21 | 15 |
|
22 |
| - This simulates scheduling without generating any job files. |
| 16 | + $ cylc play --mode=dummy <workflow-id> # real dummy jobs |
23 | 17 |
|
24 |
| -Set the run mode (default ``live``) on the command line: |
| 18 | +**Simulation mode** does not run real jobs at all. |
25 | 19 |
|
26 | 20 | .. code-block:: console
|
27 | 21 |
|
28 |
| - $ cylc play --mode=dummy <workflow-id> |
| 22 | + $ cylc play --mode=simulation <workflow-id> # no real jobs |
29 | 23 |
|
30 |
| -You can get specified tasks to fail in these modes, for more flexible workflow |
31 |
| -testing. See :cylc:conf:`[runtime][<namespace>][simulation]`. |
32 | 24 |
|
| 25 | +Simulated Run Length |
| 26 | +^^^^^^^^^^^^^^^^^^^^ |
33 | 27 |
|
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`. |
36 | 30 |
|
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. |
40 | 34 |
|
41 | 35 |
|
42 |
| -Limitations Of Workflow Simulation |
| 36 | +Limitations of Workflow Simulation |
43 | 37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
44 | 38 |
|
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. |
50 | 48 |
|
51 | 49 | .. note::
|
52 | 50 |
|
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. |
57 | 54 |
|
58 | 55 |
|
59 | 56 | Restarting Workflows With A Different Run Mode?
|
60 | 57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
61 | 58 |
|
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. |
68 | 62 |
|
0 commit comments