Skip to content

Fix invalid integration comparisons and reference-generation failures - #8138

Open
cheerly-pku wants to merge 6 commits into
deepmodeling:developfrom
cheerly-pku:integration-reference-hardening-review
Open

cheerly-pku wants to merge 6 commits into
deepmodeling:developfrom
cheerly-pku:integration-reference-hardening-review

Conversation

@cheerly-pku

@cheerly-pku cheerly-pku commented Oct 13, 2026 •

Copy link
Copy Markdown

What's changed?

Integration comparisons could accept unmatched extra data or non-finite values. Reference generation could also save a failed comparison as an expected result. This PR rejects those comparisons, propagates collector failures, and removes incomplete reference output. The upstream temporary-file flow preserves an existing result.ref until result.ref.new is complete and valid.

Ordinary result.out files retain failed checks for the harness to report. Trailing blank lines are ignored; missing data, extra data and interior blank lines remain significant.

The merge with develop at 68da826026 preserves upstream provenance normalization, configurable current tolerance, renamed matrix/energy files, Wannier gauge-aware checks, and LR/MD/DFPT collectors. Regression tests cover temporary-reference failures and successful replacement, current output, three-component position matrices, and renamed VXC output. The electric-field references are now identical to develop; this PR no longer changes reference data.

Linked Issue

Extracted from #8042 following review so changes affecting all integration tests can be reviewed independently of PPCG. This PR changes integration validation only; it contains no solver implementation changes.

Unit Tests and/or Case Tests for my changes

Fresh verification on 2026-11-25 at 97bdb9969:

  • 67 Python tests passed.
  • 6 collector CTest entries passed, including the shell regression suite for reference generation and failure propagation.
  • Changed shell scripts passed bash -n and the repository's shfmt configuration.
  • PR-relative governance and whitespace checks passed with no findings.
PATH=/usr/bin:/bin:$PATH OMP_NUM_THREADS=1 python3 -m unittest discover -s tests/integrate/validation_tools -p 'test_*.py' -v
PATH=/usr/bin:/bin:$PATH OMP_NUM_THREADS=1 ctest --test-dir /mnt/data/Cheerly/pr8138-resolution-20261125/cmake-build --output-on-failure -R '^(compare_file_test|catch_properties_test|lr_force_collector|lr_energy_collector|md_force_collector|dfpt_freq_collector)$'
python3 tools/03_code_analysis/agent_governance_check.py --base deepmodeling/develop --head HEAD
git diff --check deepmodeling/develop...HEAD

The external minimal CMake driver registers the repository's actual tests/integrate/CMakeLists.txt; logs are retained in /mnt/data/Cheerly/pr8138-resolution-20261125. These tests exercise validation tools and synthetic failure cases, so they do not require an ABACUS calculation. They complement the existing Autotest cases.

Historical validation at ca7abf4ee on 2026-10-26 included a GNU/OpenMPI Release build and all 28 CPU rt-TDDFT cases. Those numerical runs were not repeated locally for this merge. Full CPU/CUDA integration coverage for the new head is pending the newly triggered CI.

Governance Notes

  • INPUT behavior, core-module APIs, numerical tolerances and reference data are unchanged relative to current develop.
  • No governance exceptions requested.

Reminder

@mohanchen mohanchen added Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes Tests/Examples Issues/PR related to unit tests and integrate tests labels Oct 13, 2026
@mohanchen

Copy link
Copy Markdown
Collaborator

some conflicts need to be solved. @cheerly-pku

Resolve validation-script conflicts with LibRPA producer changes: retain vxc.ref/vxc.txt naming and comparison failure propagation; preserve upstream MPI launcher flags, dedicated-validator mode and case-list filtering. Register script regressions when a Python interpreter is available without restoring a hard configure dependency.

Verified compare_file 7/7, expanded catch_properties shell regression, CTest 2/2 via the actual tests/integrate CMake subdirectory, upstream LibRPA parser 8/8, Python-disabled configuration, shell syntax and whitespace checks. No numerical references or tolerances changed; no PPCG source commits included. Full ABACUS build/runtime integration not rerun for this script-only resolution.
@cheerly-pku

cheerly-pku commented Oct 13, 2026 •

Copy link
Copy Markdown
Author

some conflicts need to be solved. @cheerly-pku

Thanks for the reminder! The conflicts have been resolved. @mohanchen

@ABACUS-PR-BOT ABACUS-PR-BOT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review of 6575824415cf3edf3a7c56e6d13be2a5b44799e5, with independent static verification. One issue is noted inline. Pinned governance and whitespace checks passed; builds and runtime tests were not run. CI diagnostics were unavailable through the selected account connector.

Upstream 250241c deliberately retains zero-valued samples after the analytic field window. Both supersine and mixed-field fixtures evolve steps 0 through 7 at 0.05 fs, while their fields end at step 6. Append the missing zero sample at 0.35 fs to the twelve affected references; retain all existing values and strict comparison tolerances.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes Tests/Examples Issues/PR related to unit tests and integrate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants