Repository navigation
fix(input): broadcast parser errors before MPI exits - #8215
Merged
mohanchen merged 2 commits intoOct 26, 2026
Merged
Conversation
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
Static review found one coverage-build issue. Candidate builds and tests were not run under the static-only scope.
AsTonyshment
approved these changes
Oct 26, 2026
mohanchen
reviewed
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
Legacy INPUT errors, including missing headers, unknown or repeated parameters, and file/stream failures, can exit on rank zero while other MPI ranks are waiting for a broadcast. The parser now returns the diagnostic to
read_parameters, which broadcasts it before all ranks enter the error-exit path. Messages identify the input file, with manual links for parameter and syntax errors.Linked Issue
Addresses the MPI parser follow-up in #8192, continuing #7719.
Unit Tests and/or Case Tests for my changes
Passed: eight four-process MPI cases (including coverage builds), 41 serial reader/item tests, 13 executable input checks, and serial/four-process Si SCF calculations.
The MPI regression driver uses the real reader and exit handler, confirms all four processes reach shutdown, and times out if they do not. Rebuilding it with the original parser reproduced the unknown-parameter timeout; the fixed parser passes. The EOF case repeats a scalar string parameter with no value or final newline; all four processes must reach shutdown.
Build and test commands
SERIAL_BUILDandMPI_BUILDare Release builds with MPI disabled/enabled respectively. Both use GCC 13.4, OpenMP enabled, LCAO/ELPA/FLOAT_FFTW disabled, andOMP_NUM_THREADS=1at runtime. Executables reportv3.11.0-beta11.Coverage verification reproduced undefined gcov symbols before the fix. With target-level
add_coverage, the test executable links and all eight MPI cases pass usingENABLE_COVERAGE=ON, without global compiler/linker coverage flags. Shutdown markers are flushed before collective finalization so the launcher cannot discard a peer's marker on nonzero exit.Successful MPI
--check-inputhas an existing finalization issue, so MPI executable checks use normal execution. The regression driver supplies collective MPI shutdown explicitly. Governance and whitespace checks passed.Governance Notes
The developer guide documents the shared error path. The affected inputs were already invalid, so parameter metadata and defaults require no changes. The change is confined to input parsing and its tests; no calculation modules are modified. No exceptions requested.
No documentation update required for the coverage/EOF follow-up because it only changes test infrastructure and regression coverage.