Skip to content

feat: add distributed MdCell domain decomposition - #7768

Merged
mohanchen merged 13 commits into
deepmodeling:developfrom
19hello:pr/distributed-mdcell
Aug 13, 2026
Merged

feat: add distributed MdCell domain decomposition#7768
mohanchen merged 13 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.

@mohanchen mohanchen added MD & LAM MD and Larege Atomic Models Refactor Refactor ABACUS codes labels Aug 4, 2026
Comment thread source/source_cell/md_cell.h
Comment thread source/source_cell/md_cell.h Outdated
Comment thread source/source_cell/md_cell.cpp Outdated
@mohanchen mohanchen added the Feature Discussed The features will be discussed first but will not be implemented soon label Aug 4, 2026
@19hello
19hello force-pushed the pr/distributed-mdcell branch from 553a09d to 3806602 Compare August 10, 2026 14:44
@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Large Systems Issues related to large-size systems and removed Feature Discussed The features will be discussed first but will not be implemented soon labels Aug 12, 2026
@mohanchen
mohanchen merged commit 648aff5 into deepmodeling:develop Aug 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Features Needed The features are indeed needed, and developers should have sophisticated knowledge Large Systems Issues related to large-size systems MD & LAM MD and Larege Atomic Models Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants