Skip to content

refactor(base): remove dead parallel wrappers and migrate legacy test coverage - #8531

Open
MrLi000001 wants to merge 2 commits into
deepmodeling:developfrom
MrLi000001:refactor/base-remove-dead-parallel-wrappers
Open

MrLi000001 wants to merge 2 commits into
deepmodeling:developfrom
MrLi000001:refactor/base-remove-dead-parallel-wrappers

Conversation

@MrLi000001

@MrLi000001 MrLi000001 commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

Linked Issue
Part of #8524
What's changed?

  • Removed four dead wrappers in source_base with zero production callers
    (verified by repo-wide grep; item 1 of issue parallel codes in ABACUS: refactor plan (in Chinese) #8524):
  • Migrated the live-function coverage of the frozen legacy tests
    test_parallel/parallel_reduce_test.cpp (582 lines) and
    test_parallel/parallel_common_test.cpp (154 lines) into
    unittests/test_parallel_reduce.cpp and unittests/test_parallel_common.cpp,
    per the governance rule that touched legacy tests must move to unittests/.
    The legacy files are deleted (allowed) and the legacy CMakeLists.txt is
    trimmed accordingly; MODULE_BASE_ParaGlobal is untouched.
  • Tests of the removed dead wrappers are dropped; all coverage of live
    wrappers (reduce_all/pool/min/max, reduce_double_allpool,
    reduce_min_pool/max_pool, all bcast_*) is preserved. In the migrated
    ReduceMinAll test the dead gather_int_all call is replaced with a raw
    MPI_Allgather so the original cross-rank assertions survive.
  • New MPI test targets MODULE_BASE_parallel_reduce (mpirun -np 4) and
    MODULE_BASE_parallel_common (mpirun -np 3) are registered in
    unittests/CMakeLists.txt, mirroring the existing
    MODULE_BASE_parallel_shared_memory registration pattern.
  • No user-visible behavior change. The base library API surface shrinks;
    no remaining code references the removed symbols (grep-verified).

Keep the original comments of the migrated tests, including the
commented-out debug printfs, unchanged except where the removal of the
dead wrappers requires it: dropped test entries in the file header,
GatherIntAll renamed to ReduceMinAll, and the runner reference updated
to unittests/CMakeLists.txt. This keeps the rename diff focused on the
actual migration changes.

Part of deepmodeling#8524

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant