Repository navigation
Conversation
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
No new correctness defect found in the inspected precision guard and nspin handoff. One nonblocking diagnostic suggestion is inline. This was a static review of 7df13fa89513e8227924262bf1541a46c987b14e against e5ad53046d4f4c4502bd04657b7fbeba60d97ad4; builds, tests, CLI and numerical checks were not run, and CI diagnostics were unavailable.
| item.check_value = [](const Input_Item& item, const Parameter& para) { | ||
| const Input_para& inp = para.inp; | ||
| const bool pw_onsite_solver = inp.basis_type == "pw" | ||
| && (inp.esolver_type == "ksdft" || inp.esolver_type == "tddft"); |
Collaborator
There was a problem hiding this comment.
Non-blocking: For esolver_type=tddft, switching to double precision still leaves DFT+U and spin constraints unsupported (pw::check_td_input). Please identify that solver restriction in this diagnostic while preserving early rejection.
This branch has not been deployed
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.Linked Issue
No linked issue; this PR addresses the single-precision PW onsite silent-skip path found during review.
Unit Tests and/or Case Tests for my changes
cmake --build build --target MODULE_IO_read_item_serial abacus_basic_para -j 4— passed.cmake --build build --target module_pwdft -j 4— passed.cmake --build build --target onsite_op_test MODULE_PW_dftu_base_test MODULE_PW_test_dftu_pw_tools -j 4— passed.OMP_NUM_THREADS=1 ctest --test-dir build --output-on-failure -R '^(onsite_op_test|MODULE_PW_dftu_base_test|MODULE_PW_test_dftu_pw_tools|MODULE_IO_read_item_serial)$'— 4/4 passed outside the restricted sandbox. The first sandboxed run could not initialize MPI; the rerun passed.build/abacus_basic_para --version— v3.11.0-beta11;build/abacus_basic_para -h precision— displays the new restriction.OMP_NUM_THREADS=1 build/abacus_basic_para --check-inputon isolated copies of PW DFT+U and DeltaSpin cases withprecision single— both exited 1 with feature-specific errors before SCF./tmp:relax_dftu_spin2(1 rank) andscf_deltaspin2(2 MPI ranks) completed. DeltaSpin energy, force, and stress matchresult.ref. The DFT+U relax values differ from the repository reference by 0.0004037623 eV, 0.002652 force sum, and 0.602177 stress sum. The unmodifiedupstream/developcode, rebuilt and run on the same isolated input, produced exactly the same values as this patch, so there is no numerical drift from this change.python3 tools/03_code_analysis/agent_governance_check.py --staged— no errors; two review warnings explained below.git diff --cached --check— passed.python3 tools/03_code_analysis/code_quality_score.py --format json source/source_pw/module_pwdft/op_pw_proj.cpp— 79 before, 91 after. This is static quality evidence, not numerical validation.What's changed?
nspintoOnsiteProjat construction and use it for the existing nspin=1/2/4 potential layout and spin selection. No double-precision arithmetic or kernel was changed.Governance Notes
precisionInput_Item help text now states the restriction. Generated documentation is a build artifact and was not committed.PARAM.inp.nspinvalue once into the operator. Four global reads are removed fromop_pw_proj.cpp; the PR has a net reduction of three global references. The remaining read belongs at the existing Hamiltonian construction boundary.