Skip to content

Commit 2166e4a

Browse files
Merge pull request #816 from oliver-sanders/troubleshooting++
troubleshooting: flesh out the why are tasks waiting section
2 parents 5e38a66 + b4a8549 commit 2166e4a

File tree

2 files changed

+105
-11
lines changed

2 files changed

+105
-11
lines changed

src/user-guide/running-workflows/tasks-jobs-ui.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ as a proportion of the average runtime.
6767
|
6868
6969

70+
.. _user_guide.task_modifiers:
71+
7072
Task Modifiers
7173
--------------
7274

src/user-guide/troubleshooting.rst

Lines changed: 103 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ Problems
123123
--------
124124

125125

126+
.. _troubleshooting.job_status_not_updating:
127+
126128
Job Status Isn't Updating
127129
^^^^^^^^^^^^^^^^^^^^^^^^^
128130

@@ -287,21 +289,111 @@ be possible to restart it as you would normally using ``cylc play``. Cylc
287289
will pick up where it left off.
288290

289291

290-
Why isn't my task running?
291-
^^^^^^^^^^^^^^^^^^^^^^^^^^
292+
Why is my task stuck in the waiting state - |task-waiting|?
293+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294+
295+
Tasks in the "waiting" state are waiting for something to happen before Cylc
296+
will submit them.
297+
298+
To find out what is holding the task back from running:
299+
300+
.. tab-set::
301+
302+
.. tab-item:: In the GUI
303+
:sync: gui
304+
305+
Click on the task, then select "Info" from the menu.
306+
307+
This will open the "Info View" from which you can inspect the task's
308+
state and prerequisites.
309+
310+
.. note::
311+
312+
At present, the GUI does not display xtriggers or ext-triggers.
313+
This will change soon, until then, use ``cylc show`` via a command
314+
line interface.
315+
316+
.. tab-item:: With the Tui
317+
:sync: tui
318+
319+
Navigate to the task, press "Enter" to bring up the menu, select "show"
320+
and press enter.
321+
322+
This will run the ``cylc show`` command on the given task and present
323+
the output in the Tui.
324+
325+
.. tab-item:: On the CLI
326+
:sync: cli
327+
328+
Run the ``cylc show`` command on the task, i.e
329+
``cylc show <workflow>//<cycle>/<task>``.
330+
331+
Note, at present ``cylc show`` can only display
332+
:term:`active tasks <active task>`. Waiting tasks beyond the
333+
:term:`n=0 window <n-window>` have no satisfied prerequisites.
334+
335+
|
336+
337+
There are several reasons why a task might be held back from running:
338+
339+
It's waiting for upstream tasks to produce their required outputs:
340+
E.g, the previous task hasn't run yet, or ran but didn't produce its
341+
:term:`required outputs <required output>`.
342+
343+
Such tasks will be reported as having unsatisfied dependencies.
344+
It's waiting for external events:
345+
:ref:`Xtriggers <Section External Triggers>` and
346+
:ref:`ext-triggers <Old-Style External Triggers>`
347+
can be used to make tasks wait for events
348+
external to the workflow, such as the progress of task in other workflows
349+
or the :ref:`real-world time <Built-in Clock Triggers>`.
350+
351+
Such tasks will be listed as having unsatisfied external triggers.
352+
It's waiting for older cycles to catch up:
353+
Cylc controls how far ahead of the oldest cycle the workflow runs using the
354+
:term:`runahead limit`. You can alter this limit to let cycles run further
355+
ahead, or hold them back for longer.
356+
357+
Such tasks will be in the :ref:`runahead state <user_guide.task_modifiers>` -
358+
|task-runahead|.
359+
It's waiting in an internal queue:
360+
:ref:`Internal queues <InternalQueues>` limit how many tasks a workflow
361+
will submit simultaneously.
362+
363+
Note, there is a
364+
`default queue <flow.cylc[scheduling][queues][default]limit>` that applies
365+
to all tasks.
366+
367+
You can adjust queue limits to alter the maximum number of tasks that
368+
Cylc will submit in parallel.
369+
370+
Such tasks will be in the :ref:`queued state <user_guide.task_modifiers>` -
371+
|task-queued|.
372+
It's held:
373+
Cylc will not automatically submit tasks which have been put in the
374+
:ref:`held state <user_guide.task_modifiers>` - |task-held|.
375+
376+
Either release the task (to allow it to run) or trigger the task (to force
377+
it to run).
378+
The workflow is paused:
379+
Cylc will not automatically submit tasks while the workflow is paused.
380+
381+
Unpause the workflow (e.g, with the ``cylc play`` command) to allow tasks
382+
to run normally, or trigger the task to force it to run now.
292383

293-
To find out why a task is not being run, use the ``cylc show`` command.
294-
This will list the task's prerequisites and xtriggers.
295384

296-
Note, at present ``cylc show`` can only display
297-
:term:`active tasks <active task>`. Waiting tasks beyond the
298-
:term:`n=0 window <n-window>` have no satisfied prerequisites.
385+
Why is my task stuck in the submitted state - |task-submitted|?
386+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
299387

300-
Note, tasks which are held |task-held| will not be run, use ``cylc release``
301-
to release a held task.
388+
If a task is in the submitted state, then Cylc has submitted
389+
a job to the defined platform. It will wait in that platforms queue
390+
until the :term:`job runner` is able to run it.
302391

303-
Note, Cylc will not submit jobs if the scheduler is paused, use ``cylc play``
304-
to resume a paused workflow.
392+
You can "poll" the job submission to check it's still there by using the
393+
``cylc poll`` command (or the poll option in the GUI / Tui). If the task
394+
changes state (e.g. to running, succeeded or failed) as the result of polling
395+
the job, then there may be a communication problem between the job and the
396+
Cylc scheduler. See :ref:`troubleshooting.job_status_not_updating` for info.
305397

306398

307399
Required files are not being installed on remote platforms

0 commit comments

Comments
 (0)