Skip to content

feat: add distributed MdCell domain decomposition - #7768

Open
19hello wants to merge 2 commits into
deepmodeling:developfrom
19hello:pr/distributed-mdcell
Open

feat: add distributed MdCell domain decomposition#7768
19hello wants to merge 2 commits into
deepmodeling:developfrom
19hello:pr/distributed-mdcell

Conversation

@19hello

@19hello 19hello commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • I have linked an issue or explained why this PR does not need one.
  • I have added adequate unit tests and/or case tests, or explained why not.
  • I have listed the exact verification commands run and their results.
  • I have described user-visible behavior changes, including INPUT parameter changes.
  • I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other source/ changes.
  • I have requested any needed governance exception below.

No linked issue. This PR is a scoped internal refactor in the staged parallel-MD series and does not change the INPUT interface.

Unit Tests and/or Case Tests for my changes

  • Commands run:

    cmake -S /tmp/abacus-pr2-rework -B /tmp/abacus-pr2-rework-build \
      -DENABLE_MPI=ON -DBUILD_TESTING=ON -DENABLE_LCAO=OFF -DENABLE_LIBXC=OFF
    
    env CCACHE_DISABLE=1 cmake --build /tmp/abacus-pr2-rework-build \
      --target abacus_pw_para \
               MODULE_CELL_NEIGHBOR_neighbor_search \
               MODULE_CELL_NEIGHBOR_mdcell_migrate_mpi \
               MODULE_CELL_NEIGHBOR_distributed_mdcell_reader \
               MODULE_MD_LJ_pot -j4
    
    env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-openmp/libopenblas.so.0 \
      OMP_NUM_THREADS=1 \
      ctest --test-dir /tmp/abacus-pr2-rework-build \
      -R 'MODULE_CELL_NEIGHBOR_(neighbor_search|mdcell_migrate_mpi|distributed_mdcell_reader_np4)$' \
      --output-on-failure
    
    env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-openmp/libopenblas.so.0 \
      OMP_NUM_THREADS=1 \
      ctest --test-dir /tmp/abacus-pr2-rework-build \
      -R '^MODULE_MD_LJ_pot$' --output-on-failure
    
    cd tests/04_FF
    env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-openmp/libopenblas.so.0 \
      OMP_NUM_THREADS=1 \
      bash ../integrate/Autotest.sh \
      -a /tmp/abacus-pr2-rework-build/abacus_pw_para \
      -f CASES_CPU.txt -r '^01_LJ_Anderson$' -n 2 -o 1
    
    python3 tools/03_code_analysis/agent_governance_check.py --staged
    git diff --check
    
  • Result summary:

    • abacus_pw_para built successfully.
    • All 3 focused neighbor/MPI tests passed.
    • MODULE_MD_LJ_pot passed.
    • 2-rank 01_LJ_Anderson integration case passed all energy, force, and stress checks.
    • Staged governance check and whitespace check passed.
  • Checks not run, with reason:

    • No full integration suite was run; this PR is limited to the distributed cell/neighbor infrastructure and its focused MPI and LJ regression coverage.

What's changed?

  • Add MdCell as a distributed MD cell representation with owned atoms, ghost atoms, atom migration, and lattice updates.
  • Add a distributed STRU reader for LJ-MD initialization.
  • Extend neighbor-search infrastructure to work with UnitCell and MdCell.
  • Remove obsolete AtomProvider and UnitCellLite abstractions.
  • Update the existing LJ path to use UnitCell directly; this PR does not enable the new MdCell-based LJ solver path yet.
  • Replace the obsolete neighbor MPI benchmark with focused migration and distributed-reader MPI tests.

Governance Notes

  • INPUT/docs changes:

    • No INPUT parameter, parser, default-value, or user-visible documentation behavior changed. No updates to docs/parameters.yaml or input
      documentation are required.
  • Core module impact:

    • Changes are limited to source_cell, neighbor-list infrastructure, and focused MD/LJ test linkage.
    • No ESolver behavior is changed beyond replacing its internal UnitCellLite adapter with direct UnitCell use.
    • MdCell-based solver execution, MD-driver dispatch, and end-to-end parallel-MD workflow integration are intentionally deferred to later PRs in
      this series.
  • Exceptions requested:

    • None.
    • Header dependency warnings are intentional: MdCell owns LocalAtom vectors and exposes lattice-related value/reference types, so the complete
      declarations are required.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant