Skip to content

Add opt-in action-level diagnostics for non-finite values - #1469

Open
Zhang-pchao wants to merge 5 commits into
plumed:masterfrom
Zhang-pchao:codex/plumed-nonfinite-trace
Open

Zhang-pchao wants to merge 5 commits into
plumed:masterfrom
Zhang-pchao:codex/plumed-nonfinite-trace

Conversation

@Zhang-pchao

@Zhang-pchao Zhang-pchao commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add PLUMED_NONFINITE_ACTION_TRACE, an opt-in diagnostic selecting action labels (or *). Identify the first non-finite value, scalar derivative, propagated action force, atomic force or cell force, including step, phase, action and element.

All spatial MPI ranks must use the same selection and action graph. A local failure is reduced to the first reporting rank, broadcast, and raised on every participant before the next action. Separate replica communicators are not synchronized by this diagnostic; the MD host must terminate other replicas on an exception. The default is disabled; enabled tracing can be expensive. Grid derivative layouts and arbitrary internal action state are outside its coverage.

Validation

Independent current-master MPI build passed. Six serial cases cover singular CV/custom derivatives, atomic/cell force overflow, backward scalar-force overflow and a finite boundary control. A four-rank test-only action injects an infinite derivative on rank three: all ranks receive the diagnostic and terminate normally; a finite control passes. Existing rt74 also passes. Native astyle and whitespace checks pass.

The regression uses identical action graphs on every rank. An earlier test using divergent expressions hung during setup and was replaced, without relaxing the timeout. This feature diagnoses numerical failures; a finite result is not scientific validation.

Documentation

The native current-master new-manual generator and MkDocs build completed, and the DEBUG examples have empty stderr and no broken-example entry. The full manual reports 36 failing example pages outside DEBUG and existing/missing optional-module link warnings in this build environment; this is not a claim that the entire upstream manual is warning-free.

Python/OpenMP CI follow-up

Includes the separately reviewable regression-process lifetime fix #1470, which retains the dynamically loaded kernel during Python shutdown. It preserves two-thread execution and the original numerical reference. This addresses the rt-symfunc shutdown failure observed on the debug runner.

Regression follow-up

Included the accepted rt-protein shutdown fix #1473, the rt-grid follow-up #1477, and the timestep-test initialization fix accepted in #1464. The Python configs pass three direct two-thread runs per case with byte-identical reference output; the existing build reports Python unavailable to the native runner. The timestep regression passes through the native runner with poisoned automatic-variable initialization against both v2.10 and master kernels. No reference values, tolerances or thread counts were changed. The Autoconf download failure has a separate upstream CI proposal in #1474.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants