Skip to content

fix: backport conda-forge build fixes - #5985

Closed
njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:backport/conda-forge-patches
Closed

fix: backport conda-forge build fixes#5985
njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:backport/conda-forge-patches

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Superseded by the split PRs:

0003-kokkos-build-cuda-fatbins.patch remains excluded because it targets the separate LAMMPS source tree rather than DeePMD-kit.

Agent: ChatGPT
Model: GPT-5.6 Sol

Backport the deepmd-kit-targeted patches from
conda-forge/deepmd-kit-feedstock@d021382.
The CUDA fatbin patch is intentionally excluded because it targets the
separate LAMMPS source tree.

Agent: ChatGPT
Model: GPT-5.6 Sol
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.84%. Comparing base (8cfd46e) to head (0eddb27).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5985      +/-   ##
==========================================
- Coverage   79.10%   78.84%   -0.26%     
==========================================
  Files        1105     1105              
  Lines      130981   130981              
  Branches     4771     4771              
==========================================
- Hits       103609   103273     -336     
- Misses      25686    26024     +338     
+ Partials     1686     1684       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

pull Bot pushed a commit to ishandutta2007/deepmd-kit that referenced this pull request Aug 28, 2026
## Summary

Backport `0005-share-lammps-kokkos-runtime.patch` from
`conda-forge/deepmd-kit-feedstock@d02138263b0b30629fe28c68c8bcecc2b8644513`.

A runtime LAMMPS plugin should reuse the Kokkos runtime already linked
into `liblammps`. Linking `Kokkos::kokkos` again can create a second
CUDA/Kokkos runtime instance and corrupt shutdown state when the plugin
unloads.

Import the Kokkos include paths, compile definitions/options/features,
and link options needed for device compilation while leaving runtime
Kokkos symbols to `liblammps`; retain the CUDA and `LIBDL` helper
targets when available.

## Validation

- Single-file backport matching the feedstock patch.
- Split from deepmodeling#5985 so the runtime-linking change can be reviewed
independently.
- Full build/runtime validation is left to upstream CI.

Agent: ChatGPT
Model: GPT-5.6 Sol

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved Kokkos plugin build configuration by correctly inheriting
required include paths, compiler settings, and linker options.
* Added conditional support for CUDA and dynamic loading capabilities
when available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pull Bot pushed a commit to ishandutta2007/deepmd-kit that referenced this pull request Aug 28, 2026
## Summary

Backport `0002-support-lammps-2025-kokkos-api.patch` from
`conda-forge/deepmd-kit-feedstock@d02138263b0b30629fe28c68c8bcecc2b8644513`.

Support both the LAMMPS 22Jul2025 Kokkos API and newer LAMMPS releases
by selecting the appropriate reverse-communication buffer and per-atom
energy accumulator types from `LAMMPS_VERSION_NUMBER`.

## Validation

- Four-file backport matching the feedstock patch.
- Split from deepmodeling#5985 so the compatibility change can be reviewed
independently.
- Full build is left to upstream CI.

Agent: ChatGPT
Model: GPT-5.6 Sol

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Compatibility**
- Improved support across multiple LAMMPS versions for Kokkos-based
DeepMD and DPA-4-spin simulations.
- Updated reverse communication and per-atom energy handling to use
version-compatible data formats.

- **Bug Fixes**
- Resolved compatibility issues that could affect reverse communication
and energy accumulation across LAMMPS releases.
- Preserved existing force, magnetic-force, and virial calculation
behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
pull Bot pushed a commit to ishandutta2007/deepmd-kit that referenced this pull request Aug 29, 2026
## Summary

Backport `0004-register-lammps-kokkos-plugin-styles.patch` from
`conda-forge/deepmd-kit-feedstock@d02138263b0b30629fe28c68c8bcecc2b8644513`.

Runtime LAMMPS plugins do not consume the `PairStyle` declarations used
by the built-in package machinery, so explicitly register:

- `deepmd/kk`
- `deepmd/kk/device`
- `deepmd/kk/host`
- `dpa4spin/kk`
- `dpa4spin/kk/device`
- `dpa4spin/kk/host`

The newly registered Kokkos plugin styles are attributed to **Tiancheng
Li** via `plugin.author`.

## Validation

- Single-file change derived from the feedstock patch, with only the
requested author attribution adjusted.
- Existing non-Kokkos plugin author fields are unchanged.
- Split from deepmodeling#5985 so plugin registration can be reviewed independently.
- Full build/runtime validation is left to upstream CI.

Agent: ChatGPT
Model: GPT-5.6 Sol

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
  - Added Kokkos-enabled support for DeepMD and DPA-4Spin pair styles.
- Added host and device runtime variants for improved compatibility
across supported execution environments.
- Registered additional pair-style aliases so these implementations can
be selected through standard runtime configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

## Dependencies and follow-up validation

Merge order: corrected deepmodeling#5987, then deepmodeling#5989, then this PR. The Kokkos
registrations in this PR depend on the compatibility boundary from deepmodeling#5987
and the shared-runtime linkage from deepmodeling#5989.

Validated the combined changes with `DEEPMD_LAMMPS_KOKKOS=ON`,
`PKG_PLUGIN=ON`, and `PKG_KOKKOS=ON` against `stable_22Jul2025_update5`,
`patch_10Sep2025`, and `patch_20Aug2026`. In every build, `plugin load`
succeeded and `plugin list` reported all six aliases: `deepmd/kk`,
`deepmd/kk/device`, `deepmd/kk/host`, `dpa4spin/kk`,
`dpa4spin/kk/device`, and `dpa4spin/kk/host`.

Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant