Command-line interface¶
The foamnordic command installs and diagnoses the native runtime, reports active paths, inspects FNOM artefacts and removes only marker-owned generated assets. Commands return a non-zero exit status on validation or execution failure.
Command index¶
| Command | Purpose |
|---|---|
foamnordic build |
Build and install the runtime for the active OpenFOAM ABI |
foamnordic doctor |
Run read-only Python, native, OpenFOAM, MPI and ABI checks |
foamnordic dir |
Report active installation paths |
foamnordic inspect |
Display a validated FNOM execution contract |
foamnordic validate |
Validate an FNOM container without executing its payload |
foamnordic diff |
Compare two validated FNOM contracts and payload digests |
foamnordic compile |
Warm the target-native cache for a compiled FNOM artefact |
foamnordic clobber |
Remove marker-owned build, run or virtual-environment assets |
foamnordic --version prints the installed package version. foamnordic COMMAND --help is the canonical terse reference generated by the installed version.
Native build¶
foamnordic build [--source PATH] [--build-dir PATH] [--prefix PATH]
[--jobs N] [--without-onnx] [--dry-run]
| Option | Default | Meaning |
|---|---|---|
--source PATH |
Installed source discovery | FoamNordic source tree containing the native CMake project |
--build-dir PATH |
ABI-specific user cache | CMake build directory |
--prefix PATH |
ABI-specific user runtime | Native installation prefix |
--jobs N |
Available CPU count | Positive parallel build-job count |
--without-onnx |
false | Skip the native ONNX ModelHost and its ONNX Runtime requirement |
--dry-run |
false | Print build commands without executing them |
The active OpenFOAM environment must provide wmake. Each ABI receives an independent runtime generation, so multiple OpenFOAM installations can coexist.
Diagnostics and paths¶
foamnordic doctor
foamnordic dir [--runtime | --include | --openfoam-library | --templates]
doctor is read-only. With no selector, dir reports the package, environment and native paths together. A selector prints exactly one path for use in shell scripts; the selectors are mutually exclusive.
FNOM tools¶
foamnordic inspect MODEL.fnom [--json]
foamnordic validate MODEL.fnom
foamnordic diff LEFT.fnom RIGHT.fnom [--json]
foamnordic compile MODEL.fnom
| Command or option | Behaviour |
|---|---|
inspect |
Validates the container and reports backend, tensor contracts, scalers, runtime and payload layout |
validate |
Checks structure, bounds, contracts, scalers and payload layout without executing supplied model code |
diff |
Compares complete manifests and streamed payload digests while ignoring file paths and container padding |
compile |
Compiles a portable compiled payload for the current target and retains the library in the content-addressed cache |
--json |
Emits machine-readable output for inspect or diff |
Safe cleanup¶
foamnordic clobber [--workspace PATH ...] [--virtual PATH ...] [--dry-run]
| Option | Default | Meaning |
|---|---|---|
--workspace PATH |
none | Include marker-owned run directories below PATH/runs; repeatable |
--virtual PATH |
none | Include an explicitly selected marker-owned virtual environment; repeatable |
--dry-run |
false | Show the removals without changing the filesystem |
Build caches and selected paths are removed only when FoamNordic ownership markers validate the target. Source cases and unmarked directories are preserved.