39.1 Reading an nlmx error
What you will learn
- Identify the stage that was active
- Separate the message, exit class, hint, and transcript
- Know why an early failure may have no log
Prerequisites: Chapter 36 exit-code reference, Chapter 38 output completion, and the Chapter 39 overview.
This page describes nlmx 4.16.2. Troubleshooting must preserve the failed attempt: keep its exact command, working directory, log, resolved settings, input/model identities, partial outputs, and process exit code. Correct one causal condition at a time and compare the new evidence with the failed run. Never convert a nonzero exit into success in a wrapper, and never interpret exit 0 as scientific acceptance without the command-native verdict.
An ordinary nlmx failure is deliberately structured. The terminal and transcript show FAILED during stage <stage>: <message>, then exit code N (<class>), an optional hint: ..., and either the retained transcript path or an explicit statement that no log was attached. Read all four components; the shortest line is rarely the whole diagnosis.
The stage answers “what was nlmx doing?” A path error during inputs is different from the same operating-system text during write outputs. The message contains the immediate condition and often a file, subject, parameter, or setting. The exit class groups failures for automation and triage. The hint is a proposed next action, not authorization to alter scientific inputs without review. The transcript preserves earlier warnings and decisions that can explain the final line.
0.42s error FAILED during stage `read model artifacts`: covariance and correlation matrices disagree (max 2.1e-03)
0.42s error exit code 6 (inconsistent NONMEM artifacts)
0.42s error hint: the .cov and .cor may come from different runs; verify the run family or drop the .cor
0.42s error full transcript retained at results/log_0123456789.txt
Do not begin with the hint alone. First verify that the path and run identity named by the message are the ones intended. “Drop the .cor” is appropriate only when the analysis does not require it and the remaining covariance evidence is qualified; it is not a license to combine mismatched files.
Some failures happen before output-directory preparation. CLI parsing (often exit 2) occurs before a transcript can be attached; the logger reports “no log file was attached” for other early failures. Capture stdout/stderr and $LASTEXITCODE/$? in the calling shell. Color is suppressed automatically when stderr is not an interactive terminal; --no-color makes captured text simpler.
Page checklist
- Did you retain the exact exit code, stage, message, hint, log, and partial output?
- Did you identify one causal layer before changing anything?
- Is the recovery a new, traceable attempt with the same intended estimand?
- Did you check command-native and scientific acceptance after process completion?
Navigation
See the previous page, next page, and complete error reference.