Repository navigation
fix: refresh periodic ghost image shifts with skin - #8102
Merged
mohanchen merged 7 commits intoOct 10, 2026
Merged
Conversation
mohanchen
approved these changes
Oct 9, 2026
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 fixes a correctness issue discovered during local molecular-dynamics boundary-crossing validation.
Unit Tests and/or Case Tests for my changes
cmake -S /tmp/abacus-md-skin-dynamic \ -B /tmp/abacus-md-skin-dynamic-build \ -DBUILD_TESTING=ON \ -DENABLE_MPI=ON \ -DENABLE_LCAO=OFF \ -DENABLE_LIBXC=OFF \ -DCMAKE_BUILD_TYPE=Debug cmake --build /tmp/abacus-md-skin-dynamic-build \ --target MODULE_CELL_NEIGHBOR_mdcell_migrate_mpi \ -j4 git diff --check python3 tools/03_code_analysis/agent_governance_check.py --staged - Result summary: - CMake configuration passed. - MODULE_CELL_NEIGHBOR_mdcell_migrate_mpi compiled and linked successfully. - git diff --check passed. - The staged governance check passed with a documentation-sync warning. The warning is addressed below because this change is internal and does not modify INPUT behavior. - Added MdCellMigrateMpiTest.SkinUpdatesPeriodicGhostImageWithoutRebuild, which verifies that a periodic ghost image is updated without rebuilding the neighbor-search object. - Checks not run, with reason: - The 2-process MPI test was attempted, but the local runtime environment mixes toolchain and system BLAS/LAPACK/ScaLAPACK libraries. The executable exits before test startup with ABI errors involving gotoblas and sgetrs_N_parallel. This is a local runtime-library issue, not a test assertion failure. ### What's changed? - Fixed periodic ghost coordinates during reusable-skin MD updates. - Ghost image coordinates are now recalculated from the current atom position and ghost exchange slot instead of reusing a stale periodic image shift. - The existing ghost layout and neighbor-search object are reused; crossing a periodic boundary does not force a complete ghost or neighbor-list rebuild. - The ghost position message now carries both wrapped fractional coordinates and dynamically selected image coordinates. - Added an MPI regression test covering an atom moving from frac.x = 0.99 to frac.x = 0.01 without neighbor-list rebuilding. - No user-visible INPUT behavior changed. ### Governance Notes - INPUT/docs changes: None required. This PR changes only internal MD ghost-coordinate communication and does not change any INPUT parameter, default value, parser behavior, or user-facing documentation. - Core module impact: The changes are limited to MDCell neighbor decomposition and ghost-coordinate synchronization under source/source_cell/module_neighlist. There are no changes to ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or electronic-structure algorithms. - Exceptions requested: None.