Feature: Support native binary output for out_hsr - #7806
Merged
mohanchen merged 1 commit intoAug 12, 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 previously reserved
out_hsr 2format while preserving the existingout_hsrand legacy-alias contracts.Unit Tests and/or Case Tests for my changes
cmake --build /tmp/abacus_out_hsk_build_mpi --target abacus_basic_para -j1 -- -sctest --test-dir /tmp/abacus-module-hs-tests --output-on-failure -R 'MODULE_IO_(write_hs_r_compat_test|write_hsr_binary_test_parallel|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_hsr|scf_out_hsr_spin4|scf_out_hsr_binary_spin2)$'/tmp/abacus_out_hsk_build_mpi/abacus_basic_para -h out_hsr/tmp/abacus_out_hsk_build_mpi/abacus_basic_para --check-inputfromtests/03_NAO_multik/scf_out_hsr_binary_spin2/tmp/abacus_out_hsk_build_mpi/abacus_basic_para --generate-parameters-yamlfollowed bypython3 docs/generate_input_main.pyanddiff -qagainst both generated documentspython3 -m py_compile tests/integrate/tools/compare_hsr_binary.pybash -n tests/integrate/tools/catch_properties.shpython3 tools/03_code_analysis/agent_governance_check.py --staged --format textgit diff --cached --checkv3.11.0-beta8build passed.03_NAO_multikregression passed 17/17 across text H(R)/S(R),nspin=4, and the new binarynspin=2case.Input_Convbridge fromPARAMtoTD_info; the changed expression enables format 2 and reduces literal global references from three to two (net_delta=-1).What's changed?
out_hsr 2for native ABI-dependent CSR binary H(R)/S(R) output using.datfilenames.long longrow pointers.nspin=1/2/4, append/per-step filenames, sparse threshold, text format 1, NPZ format 3, and legacy aliases.parameters.yamlandinput-main.mdfrom the executable.Governance Notes
out_hsr 2is now accepted and documented; an optional precision still warns that it applies only to text format 1. Generated INPUT documentation was rebuilt from the final executable.source_ioH(R)/S(R) serialization and its existing control path. Numerical Hamiltonian construction is unchanged.Input_Convkeeps RT-TDDFT matrix construction enabled for all supportedout_hsrformats.PARAMuse is the pre-existingInput_Convcompatibility bridge.