Repository navigation
Fix PW DFT+U initialization lifecycle - #8203
Merged
mohanchen merged 1 commit intoOct 23, 2026
Merged
Conversation
lanshuyue
force-pushed
the
codex/fix-pw-dftu-init-lifecycle
branch
from
October 23, 2026 03:04
e0ded0a to
342033d
Compare
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
Static review of 342033d3 against 370ba685e: no change-induced correctness defect identified. Whitespace and governance checks completed; build/runtime/CI results were not independently verified.
Non-blocking: In source/source_pw/module_pwdft/dftu_base.h, please document that Plus_U_Base::init_base() is called once on a fresh object per solver/run. With repeated-initialization safeguards removed, the declaration’s allocation-only comment leaves that precondition implicit; a new configuration should use a fresh object. A follow-up after merge is fine.
mohanchen
reviewed
Oct 23, 2026
lanshuyue
force-pushed
the
codex/fix-pw-dftu-init-lifecycle
branch
from
October 23, 2026 07:57
342033d to
2e6e822
Compare
lanshuyue
force-pushed
the
codex/fix-pw-dftu-init-lifecycle
branch
from
October 23, 2026 09:54
2e6e822 to
6398a05
Compare
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.
Reminder
AGENTS.mdanddocs/developers_guide/agent_governance.md.source/changes.Base update
#8196 has been merged as
370ba685e. This branch was rebased onto that commit, so the PR contains only the DFT+U lifecycle fix.Linked Issue
Fixes #8197
Unit Tests and/or Case Tests for my changes
cmake --build build -j2 --target abacus_basic_para MODULE_PW_dftu_base_testenv OMP_NUM_THREADS=1 ctest --test-dir build --output-on-failure -R '^MODULE_PW_dftu_base_test$'env OMP_NUM_THREADS=1 ../integrate/Autotest.sh -a /home/lanshuyue/abacus/ABACUS/abacus-develop/build/abacus_basic_para -r '^relax_dftu_spin[24]$' -n 4 -o 1 -j 1(fromtests/01_PW)bash -n tests/integrate/validation_tools/props_basic.shgit diff --check upstream/develop...HEADpython3 tools/03_code_analysis/agent_governance_check.py --base upstream/develop --head HEAD --format textrelax_dftu_spin2andrelax_dftu_spin4cases passed all 8 numerical checks.pre-commitwas not run locally because it is not installed in the local environment.What's changed?
Plus_U_Base::init_base()from per-ionic-stepbefore_scf()setup toESolver_KS_PW::before_all_runners(), matching the LCAO initialization lifecycle.pw::setup_pot().Governance Notes
System_paraalias. The PR removes five global references and adds one (net -4).esolver_ks_pw.o,setup_pot.o, anddftu_base.oentries insource/Makefile.Objectswere verified by the successful local build.