Refactor HSolver to remove global runtime dependencies - #7887
Open
Critsium-xy wants to merge 3 commits into
Open
Refactor HSolver to remove global runtime dependencies#7887Critsium-xy wants to merge 3 commits into
Critsium-xy wants to merge 3 commits into
Conversation
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.
Summary
GlobalC,GlobalV, andPARAMreferences fromsource/source_hsolveroutputParameters()helperThe baseline scan contained 103 matching lines in
source/source_hsolver(50GlobalVoccurrences, 56PARAMoccurrences, and noGlobalCoccurrences; three lines contained both symbols). The same scan now returns zero matches.Design
HSolver is treated as a numerical solver layer. Runtime ownership remains at workflow/orchestration boundaries, while solver APIs receive only the context they need:
DiagoIterAssistreceivesdiag_comm_infofor subspace reductionsHSolverLCAOand PEXSI receive world rank/process count explicitlyThe governance checker reports migration warnings where existing globals are read at ESolver/LCAO/PSI/PW call boundaries. Those are deliberate boundary reads: this PR removes solver-layer coupling without broadening the refactor into the workflow/configuration layers. The PR-level global dependency budget is non-increasing (
added=31,removed=117,net_delta=-86).Verification
Passed:
Full serial build: 855/855 build steps passed before final formatting. After the final include cleanup, the same build was reconfigured with
-DFETCHCONTENT_FULLY_DISCONNECTED=ONand its 29 affected targets rebuilt successfully.Focused MPI/OpenBLAS targets built successfully.
Result: 11/11 passed.
Result: 5/5 passed outside the restricted sandbox.
Result: passed with review warnings described above.
Also passed:
git diff --checkand the zero-hit global dependency scan.CI follow-up
The first CI run exposed a missing direct include in the ELPA-only build path:
diago_elpa.cppstill callsModuleBase::TITLEafter dropping the transitiveglobal_variable.hinclude. Commit89a0d509cadds the requiredsource_base/tool_title.hinclude.The CI failure was reproduced and the fix was verified with:
Results: ELPA-enabled
hsolverbuild 20/20 passed;MODULE_HSOLVER_LCAOpassed;MODULE_HSOLVER_LCAO_parallelpassed outside the restricted sandbox.diago_elpa.cppscores 93/100 incode_quality_score.py.Notes
opal_ifinit: socket() failed errno=1warning; runtime/MPI tests were rerun outside the sandbox and passed.