Feature: Support native binary output for out_hsk - #7778
Merged
mohanchen merged 2 commits intoAug 5, 2026
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.
Reminder
AGENTS.mdanddocs/developers_guide/agent_governance.md.source/changes.Linked Issue
No linked issue. This PR implements the requested native binary mode for the existing
out_hskINPUT parameter.Unit Tests and/or Case Tests for my changes
cmake -S . -B /tmp/abacus_out_hsk_build_mpi -DBUILD_TESTING=ON -DENABLE_LCAO=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=mpicxxcmake --build /tmp/abacus_out_hsk_build_mpi --target MODULE_IO_write_hsk_binary_test MODULE_IO_read_item_serial -j2cmake --build /tmp/abacus_out_hsk_build_mpi --target abacus_basic_para -j2ctest --test-dir /tmp/abacus_out_hsk_build_mpi --output-on-failure -R 'MODULE_IO_(write_hsk_binary_test|read_item_serial)'OMP_NUM_THREADS=1 bash ../integrate/Autotest.sh -a /tmp/abacus_out_hsk_build_mpi/abacus_basic_para -n 2 -o 1 -r '^scf_out_hsk_binary$'OMP_NUM_THREADS=1 bash ../integrate/Autotest.sh -a /tmp/abacus_out_hsk_build_mpi/abacus_basic_para -n 2 -o 1 -r '^scf_out_hsk$'/tmp/abacus_out_hsk_build_mpi/abacus_basic_para --version/tmp/abacus_out_hsk_build_mpi/abacus_basic_para -h out_hsk/tmp/abacus_out_hsk_build_mpi/abacus_basic_para --check-inputfromtests/03_NAO_multik/scf_out_hsk_binarypython3 -m py_compile tests/integrate/tools/compare_hsk_binary.pybash -n tests/integrate/tools/catch_properties.shgit diff --cached --checkpython3 tools/03_code_analysis/agent_governance_check.py --staged--check-inputacceptedout_hsk 2; the executable reports ABACUS v3.11.0-beta7.What's changed?
out_hsk 2and route it through the existing native.datwriter without changing text or reserved NPZ behavior.intdimension followed by the row-major upper triangle, usingdoublefor Gamma-only matrices and consecutive real/imaginarydoublevalues for complex matrices.Governance Notes
out_hsk 2is now accepted; runtime help,docs/parameters.yaml,input-main.md, andhs_matrix.mdare synchronized.ModuleIOH(k)/S(k) output dispatch and serialization. No ESolver, HSolver, ElecState, Hamilt, Operator, or Psi ownership/algorithm behavior changes.