Skip to content

The last mile: run & doctor

The single most common place a new user stalls is the gap between generating a workflow and having it running. The classic path — validate → generate → cylc install → cylc play — is four tools, two of them Cylc’s, and the crucial handoff (the workflow id Cylc assigns at install) is never named in the quick start. run and doctor close that gap.

The nwp-compose last-mile lifecycle: seven stages from Author through Operate joined by CLI verbs, with run spanning Validate to Play, doctor and tutorial as entry points, and a dashed dummy-mode rehearsal branch off Play.
The last mile. run collapses Validate → Play into one command; doctor checks the node first; —dummy rehearses the graph without real binaries.

nwp-compose run — one command to the finish line

Section titled “nwp-compose run — one command to the finish line”
Terminal window
nwp-compose run forecast.yaml

run performs, in order, aborting at the first failure with a message that names the failed step:

  1. validate — the same schema + graph + physics gate as nwp-compose validate, including the unphysical-block (a CFL-violating config is refused here, not silently run).
  2. generate — render the Cylc bundle into an output directory.
  3. cylc install — and capture the concrete workflow id Cylc prints (e.g. forecast/run1).
  4. cylc play — start it, echoing the id prominently so every later cylc command is obvious.
✓ validate forecast.yaml — schema + graph + physics OK
✓ generate → ./out/ (flow.cylc, manifest.json, 8 components)
✓ install → forecast/run1
✓ play forecast/run1 is now running
Watch it: cylc tui forecast/run1
Stop it: cylc stop forecast/run1
FlagEffect
--dry-runStop after generate; print the workflow id it would use and the exact cylc commands. Writes the bundle, runs no Cylc.
--dummyExercise the graph without real binaries (cylc play --mode=dummy --main-loop dummy_bridge). Finishes in seconds.
--no-playValidate, generate, and install — but do not play. Hands you the id to play yourself.
-o, --output <dir>Where to generate the bundle (default a temp/./out-style dir).

nwp-compose doctor — preflight before you commit a long job

Section titled “nwp-compose doctor — preflight before you commit a long job”
Terminal window
nwp-compose doctor # check the environment
nwp-compose doctor forecast.yaml # also check this workflow's component prerequisites

doctor turns the silent “validate passed but the run died at task 1” failure mode into an explicit, actionable report. Each check is green (), yellow (!, advisory), or red (, blocking), and every non-green line prints the exact remediation:

CheckLooks for
Pythoninterpreter ≥ 3.12
Cylccylc on PATH at the expected 8.6.4
Virtualenvan editable install that actually resolves to this checkout
Run dirwrite access + free space on ~/cylc-run (honors CYLC_RUN_DIR)
Cache dirwrite access on the $XDG_CACHE_HOME-aware cache
GUI portthe local GUI port is free (retries ephemeral if not)
Home quotaheadroom for a Cylc venv / run dirs
Pluginsdiscovered plugin components and any name collisions
Prerequisitesper-component requires: executables and env vars (with a workflow argument)
nwp-compose doctor
✓ python 3.12.4 (>= 3.12)
✓ cylc 8.6.4 on PATH
✓ venv editable install → /home/aria/nwp-compose
! run dir ~/cylc-run on a 2% -free home filesystem
→ set CYLC_RUN_DIR=/scratch/$USER/cylc-run
✗ ungrib requires `wgrib2` (not found on PATH)
→ module load wgrib2 (or add it to your environment)
1 blocking, 1 advisory. Fix the blocking item before `nwp-compose run`.

doctor exits non-zero if any check is red, so it composes in scripts and CI as a gate.

doctor → is this NODE ready? (prerequisites, paths, quota)
validate → is this WORKFLOW correct? (schema, graph, physics)
run → make it RUN (generate → install → play, id surfaced)

The recommended first-time sequence on any new node is doctor, then run --dummy, then run.