Repository navigation
test(md): consolidate source_md unit tests and restore serial coverage - #8322
Merged
mohanchen merged 16 commits intoNov 19, 2026
Merged
Conversation
added 14 commits
November 16, 2026 22:18
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
Two issues remain: the NEP header rename breaks the enabled-backend include path, and the moved missing-restart test shares a directory with restart writers. Static review only; no build or runtime tests were executed, and author-reported results were not independently verified.
Non-blocking: Please consolidate the repeated verification/change sections and restore the two truncated Cell CTest commands. Their regex quotes and code spans currently run into later sections, so the selections cannot be copied or checked against the reported pass counts.
mohanchen
approved these changes
Nov 19, 2026
mohanchen
pushed a commit
to mohanchen/abacus-mc
that referenced
this pull request
Nov 19, 2026
… 2026-11-05-a Conflicts resolved: - source/source_io/CMakeLists.txt: merged both sides' object lists, keeping parse_args.cpp + upstream's new parse_command_line.cpp + local libxc_r_suffix.cpp - source/source_md/unittests/test_run_md.cpp: kept upstream's consolidate (deepmodeling#8322) RunMDTest/RunMDCadenceTest suite and appended local RunMdFinalStepTest
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.Linked Issue
Fixes #8298
What's changed?
source_mdtests underunittests/, merging themd_baseandmd_funcsuites and adding a dedicatedMODULE_MD_basetarget.module_neighlisttests under itsunittests/directory; preserve serial, MPI, and CUDA target conditions.dp_forcefield,lj_forcefield,nep_forcefield, andsnap_forcefield. Existing C++ class names and runtime algorithms are unchanged.nep_forcefield.hseparate from the NEP backend'snep.h, fixing compilation withNEP_DIRenabled.testing::TempDir().md_statistics.hand obsolete test files/directories.Verification
cmake -S . -B /tmp/abacus-md-serial -DNEP_DIR=/tmp/abacus-nep-cpu-8322/install— passed. This existing serial test build usesENABLE_MPI=OFF,ENABLE_LCAO=OFF, andBUILD_TESTING=ON; NEP_CPU was built from the toolchain-pinned commit629ec5d.cmake --build /tmp/abacus-md-serial --target md MODULE_MD_nep_forcefield -j8— passed with NEP enabled.cmake --build /tmp/abacus-md-serial --target MODULE_MD_dp_forcefield MODULE_MD_lj_forcefield MODULE_MD_snap_forcefield MODULE_MD_func -j8— passed.env OMP_NUM_THREADS=1 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/openblas-pthread:$LD_LIBRARY_PATH ctest --test-dir /tmp/abacus-md-serial --output-on-failure -R '^MODULE_MD|^MODULE_ESOLVER_forcefields$|^MODULE_CELL_NEIGHBOR_domain_decomposition_serial$'— 18/18 passed, including the enabled NEP test.env OMP_NUM_THREADS=1 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/openblas-pthread:$LD_LIBRARY_PATH ctest --test-dir /tmp/abacus-md-serial --output-on-failure -j4 -R '^MODULE_MD_(nep|dp|lj|snap)_forcefield$|^MODULE_MD_func$|^MODULE_MD_fire$'— 6/6 passed with concurrentMD_funcand FIRE tests.cmake --build build_parallel_md1_current --target md esolver MODULE_MD_lj_forcefield_mpi -j8— passed.env OMP_NUM_THREADS=1 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/openblas-pthread:$LD_LIBRARY_PATH ctest --test-dir build_parallel_md1_current --output-on-failure -R '^MODULE_MD_lj_forcefield_mpi'— 2/2 passed outside the restricted sandbox.ctest --test-dir /tmp/abacus-md-serial --output-on-failure -R '^MODULE_CELL_NEIGHBOR_domain_decomposition_serial$'— 1/1 passed.env OMP_NUM_THREADS=1 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/openblas-pthread:$LD_LIBRARY_PATH ctest --test-dir build_parallel_md1_current --output-on-failure -R '^MODULE_CELL_NEIGHBOR_(neighbor_search|bin_manager|allocator_and_list|page_allocator|mdcell_migrate_mpi|domain_decomposition_np[14]|mdcell_reader_np4)$'— 8/8 passed outside the restricted sandbox.python3 tools/03_code_analysis/agent_governance_check.py --base origin/develop --head HEAD --format textandgit diff --check origin/develop...HEAD— both exit 0.Governance Notes
lj_test_solver.hmust includelj_forcefield.hbecause its inline helper constructs aModuleMD::LJobject, which requires the complete type.