You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
abacus_fixer
committed
refactor(klist): rename nkstot_full to nkstot_nospin and thread ofs_warning through klist API
Three intertwined changes that must ship together to keep the build green:
1. Rename `nkstot_full` -> `nkstot_nospin` (member, getter, setter) across
all consumers (source_cell, source_lcao/module_ri, module_bse, module_lr,
module_rdmft, source_pw/module_pwdft, source_io). The old name was
ambiguous: EXX/RI/LR code already treats it as "physical k-point count
WITHOUT spin multiplicity" (see e.g. ri_2d_comm.hpp:
`ik_full + is_k * nkstot_full`), so the new name makes the convention
explicit. Comments in reciprocal_grid.h now document both:
- nkstot: INCLUDING spin multiplicity (after set_kup_and_kdw)
- nkstot_nospin: physical k-points, WITHOUT spin multiplicity
2. Thread `std::ostream& ofs_warning` through K_Vectors::set,
setup_line_kpoints, set_both_kvec, update_use_ibz, reduce_by_symmetry,
handle_symmetry_mismatch, and read_mp_mesh so they no longer read
`GlobalV::ofs_warning` directly. Internal ModuleBase::WARNING calls
are replaced with `ofs_warning <<` to keep behavior consistent.
The klist module itself no longer references GlobalV::ofs_warning;
outer callers (esolver_fp, esolver_gets, esolver_lr_lcao_tddft,
deepks_test_prep) pass `GlobalV::ofs_warning` at the boundary.
3. Thread `int my_rank` through update_use_ibz, reduce_by_symmetry,
handle_symmetry_mismatch to remove `GlobalV::MY_RANK` reads inside
the klist module.
Also included: dftu_base static-member cleanup (mark_occ_mat_initialized
-> this->occ_mat_initialized = true) which was already in the working
tree and is consistent with the project rule "no static members in
dftu_base.h".
Behavior is unchanged. Build passes with `cmake --build build_max_para_test
-j 30`. All 12 previously-failing 01_PW tests (003, 007, 028, 030, 034,
036, 037, 050, 055, 063, 078, 079, 097x2, 206, 815, scf_deltaspin2)
pass with identical etot; valgrind reports no ABACUS-side Invalid write.
0 commit comments