Running Flows

Once a flow is defined, dfm run builds and executes the task graph. This chapter walks through the typical run workflow; see Command reference for the exhaustive option reference.

Running tasks

Invoke one or more tasks by name from a directory at or below your project’s flow.yaml:

dfm run sim

dfm searches upward for the project’s flow.yaml, builds the task graph for the requested task(s) and their dependencies, and executes it. Request several tasks at once by listing them:

dfm run compile test lint

If you run dfm run with no task, dfm lists the available tasks in the package.

Controlling execution

A few options come up constantly:

-j N

Limit concurrency to N simultaneous tasks (default: all cores).

-D NAME=VALUE

Override a parameter for this run. See Parameters and Configuration for the full syntax and resolution order.

-c, --config NAME

Select a package configuration – a named variant such as debug vs. release or an alternate tool chain. See Configurations.

--runner BACKEND

Choose where tasks execute (local or a cluster backend such as lsf). See Task Runners.

For example, to run with four parallel jobs in the debug configuration:

dfm run build -c debug -j 4

Re-running and forcing work

DV Flow tracks which tasks are up to date and skips work that does not need to re-run. To override that behavior:

-f, --force

Re-run all tasks, ignoring up-to-date checks (preserves the rundir).

--clean

Remove the rundir before starting, forcing a complete rebuild.

See Incremental Builds for how up-to-date checking works and how to reuse a prior build’s artifacts with --base-rundir.

Watching progress

-u, --ui {log,progress,tui} selects the console interface: plain log output (the default for non-terminals), live progress bars, or a full-screen tui. Add -v to also show tasks that were already up to date.

Capturing diagnostics

For CI, where the rundir is ephemeral, write a self-contained diagnostics bundle that can be published as a build artifact:

dfm run sim.regress --report build/dfm-report

The report is assembled from each task’s execution data, so it works for any runner backend (local, daemon, or remote).

See Also