Repository navigation
fix(lammps): register built-in KOKKOS styles - #6054
Zhang-pchao wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
njzjz-bot
left a comment
There was a problem hiding this comment.
Agent: dot
Reviewed exact head 7d93082. No blocking findings in the style-registration change.
Checked both header guard layouts against LAMMPS's current StyleHeaderUtils.cmake marker parser and the generated-style source integration in its CMakeLists.txt. PAIR_CLASS remains the registration branch, nested LMP_KOKKOS guards protect all six markers, and the implementation/version checks remain in the non-registration branch. Regenerating the style source files after RegisterStyles updates the same generated translation units already attached to the LAMMPS target; the COMMAND guard retains the older header-generation-only path.
Local validation: preprocessed both exact-head headers with PAIR_CLASS/LMP_KOKKOS enabled and observed the expected three registrations per header. With KOKKOS disabled, both registration and implementation branches preprocess to empty output. I did not rebuild LAMMPS, run pair calculations, or validate CUDA here; the author's Serial build is distinct from these focused checks.
|
The CI run expired while waiting for approval, before any jobs started. Could you help approve and restart the checks when you have a chance? Thanks! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6054 +/- ##
==========================================
- Coverage 78.08% 77.78% -0.30%
==========================================
Files 1213 1213
Lines 147712 147713 +1
Branches 5245 5240 -5
==========================================
- Hits 115343 114905 -438
- Misses 30390 30829 +439
Partials 1979 1979 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wanghan-iapcm
left a comment
There was a problem hiding this comment.
This PR adapts the built-in LAMMPS Kokkos pair-style headers to the style-registry build and adds the generatestylesources hook to source/lmp/builtin.cmake. The mechanism is right — with the real LAMMPS generators, the previous layout emits the Kokkos registrations unguarded while the new one nests them correctly — but the built-in path this change targets has no automated coverage today, and that is what the inline comment is about.
Details inline.
wanghan-iapcm
left a comment
There was a problem hiding this comment.
The built-in Kokkos registration fix is correct on every path I could verify. The reordered PAIR_CLASS / LMP_KOKKOS guards keep the class-definition branch and the LAMMPS_VERSION_NUMBER check intact for all four macro combinations, generatestylesources is invoked at the right point for LAMMPS versions that generate style sources (and skipped where the helper does not exist), and the new configure-only CI job reproduces the documented install step and rejects both regressions it names: a missing generator call and a reverted header layout.
My earlier objection about the built-in path having no CI coverage is addressed. The remaining observations are non-blocking coverage gaps, not defects: the assertions cover the six Kokkos keys only, the generated registration source is not compiled, and the older-LAMMPS fallback branch is not exercised. None of them affect the correctness of this change.
Summary
Fix built-in DeePMD integration with LAMMPS versions that generate style registration source files as well as headers.
PAIR_CLASSbranch before theLMP_KOKKOSguard so LAMMPS style discovery finds both KOKKOS pair styles.Validation
develop(b7ad70cf956c), with MPI and the CPU KOKKOS Serial backend.lmp -hlistsdeepmd/kk,deepmd/kk/device,deepmd/kk/host, and the correspondingdpa4spinstyles.The build used an existing compatible DeePMD C library. This change affects style discovery and registration; it does not modify pair calculations. CUDA execution and a complete new DeePMD backend build were not part of this focused test.
Summary by CodeRabbit
CI follow-up (2026-10-07)
The exact-head Read the Docs build fails while installing
doc/requirements.txt, before Sphinx runs: the selected PyTorch headers require C++20, while the current target baseline selects C++17. The same build-standard mismatch appears on all five related contribution heads (#6051 through #6055). Existing issue #6048 and PR #6049 already address this compatibility problem; this PR leaves that repair in its independent upstream review. The Read the Docs check remains failed until that dependency is resolved and the build is rerun. The exact-head pre-commit.ci check passes; GitHub Actions still require maintainer approval.