Skip to content

Commit a9b41c3

Browse files
authored
Merge branch 'devel' into 0726_devel_zbl_ft
2 parents 2fdf1c9 + 88b71e8 commit a9b41c3

83 files changed

Lines changed: 1906 additions & 400 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/build_cxx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cmake -D ENABLE_TENSORFLOW=ON \
1313
-D ENABLE_PYTORCH=ON \
1414
-D ENABLE_PADDLE=ON \
1515
-D CMAKE_INSTALL_PREFIX=${SCRIPT_PATH}/../dp/ \
16-
-D LAMMPS_VERSION=stable_29Aug2024_update1 \
16+
-D LAMMPS_VERSION=stable_22Jul2025 \
1717
-D CMAKE_BUILD_TYPE=Debug \
1818
-D BUILD_TESTING:BOOL=TRUE \
1919
-D TENSORFLOW_ROOT=${TENSORFLOW_ROOT} \

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/.venv/bin",
1212
"DP_ENABLE_PYTORCH": "1",
1313
"DP_VARIANT": "cpu",
14-
"LMP_CXX11_ABI_0": "1",
1514
"UV_EXTRA_INDEX_URL": "https://download.pytorch.org/whl/cpu"
1615
}
1716
}

.github/workflows/build_wheel.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
rm -rf .git
7171
if: matrix.dp_pkg_name == 'deepmd-kit-cu11'
7272
- name: Build wheels
73-
uses: pypa/cibuildwheel@v3.0
73+
uses: pypa/cibuildwheel@v3.1
7474
env:
7575
CIBW_BUILD_VERBOSITY: 1
7676
CIBW_ARCHS: all
@@ -106,7 +106,7 @@ jobs:
106106
id-token: write
107107
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
108108
steps:
109-
- uses: actions/download-artifact@v4
109+
- uses: actions/download-artifact@v5
110110
with:
111111
pattern: cibw-*
112112
path: dist
@@ -129,7 +129,7 @@ jobs:
129129
- name: Delete huge unnecessary tools folder
130130
run: rm -rf /opt/hostedtoolcache
131131
- uses: actions/checkout@v4
132-
- uses: actions/download-artifact@v4
132+
- uses: actions/download-artifact@v5
133133
with:
134134
path: source/install/docker/dist
135135
pattern: cibw-*-manylinux_x86_64-cu${{ matrix.cuda_version }}*
@@ -162,7 +162,7 @@ jobs:
162162
needs: [build_wheels, build_sdist]
163163
runs-on: ubuntu-latest
164164
steps:
165-
- uses: actions/download-artifact@v4
165+
- uses: actions/download-artifact@v5
166166
with:
167167
path: dist/packages
168168
pattern: cibw-*

.github/workflows/package_c.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
tensorflow_version: ""
2323
filename: libdeepmd_c.tar.gz
2424
- tensorflow_build_version: "2.14"
25-
tensorflow_version: ">=2.5.0rc0,<2.15"
25+
tensorflow_version: ">=2.5.0,<2.15"
2626
filename: libdeepmd_c_cu11.tar.gz
2727
steps:
2828
- uses: actions/checkout@v4
@@ -55,7 +55,7 @@ jobs:
5555
steps:
5656
- uses: actions/checkout@v4
5757
- name: Download artifact
58-
uses: actions/download-artifact@v4
58+
uses: actions/download-artifact@v5
5959
with:
6060
pattern: libdeepmd_c-*
6161
merge-multiple: true

.github/workflows/test_cc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
OMP_NUM_THREADS: 1
4242
TF_INTRA_OP_PARALLELISM_THREADS: 1
4343
TF_INTER_OP_PARALLELISM_THREADS: 1
44-
LMP_CXX11_ABI_0: 1
4544
CMAKE_GENERATOR: Ninja
4645
CXXFLAGS: ${{ matrix.check_memleak && '-fsanitize=leak' || '' }}
4746
LSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/workflows/suppr.txt

.github/workflows/test_cuda.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
with:
3131
python-version: '3.11'
3232
# cache: 'pip'
33-
- name: Setup MPI
34-
uses: mpi4py/setup-mpi@v1
35-
with:
36-
mpi: mpich
3733
- name: Install wget and unzip
3834
run: apt-get update && apt-get install -y wget unzip
3935
- uses: lukka/get-cmake@latest
@@ -74,7 +70,6 @@ jobs:
7470
OMP_NUM_THREADS: 1
7571
TF_INTRA_OP_PARALLELISM_THREADS: 1
7672
TF_INTER_OP_PARALLELISM_THREADS: 1
77-
LMP_CXX11_ABI_0: 1
7873
CMAKE_GENERATOR: Ninja
7974
DP_VARIANT: cuda
8075
DP_USE_MPICH2: 1

.github/workflows/test_python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
key: test2-durations-combined-${{ matrix.python }}-${{ github.sha }}
9797
restore-keys: test2-durations-combined-${{ matrix.python }}
9898
- name: Download artifacts
99-
uses: actions/download-artifact@v4
99+
uses: actions/download-artifact@v5
100100
with:
101101
pattern: split-${{ matrix.python }}-*
102102
merge-multiple: true

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
88
exclude: "^.+\\.pbtxt$"
@@ -29,7 +29,7 @@ repos:
2929
exclude: ^source/3rdparty
3030
- repo: https://github.com/astral-sh/ruff-pre-commit
3131
# Ruff version.
32-
rev: v0.12.4
32+
rev: v0.12.8
3333
hooks:
3434
- id: ruff
3535
args: ["--fix"]
@@ -84,7 +84,7 @@ repos:
8484
- id: cmake-format
8585
#- id: cmake-lint
8686
- repo: https://github.com/njzjz/mirrors-bibtex-tidy
87-
rev: v1.13.0
87+
rev: v1.14.0
8888
hooks:
8989
- id: bibtex-tidy
9090
args:
@@ -154,7 +154,7 @@ repos:
154154
exclude: .pre-commit-config.yaml|source/lmp
155155
# customized pylint rules
156156
- repo: https://github.com/pylint-dev/pylint/
157-
rev: v3.3.7
157+
rev: v3.3.8
158158
hooks:
159159
- id: pylint
160160
entry: env PYTHONPATH=source/checker pylint

backend/dp_backend.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# SPDX-License-Identifier: LGPL-3.0-or-later
22
"""A PEP-517 backend to find TensorFlow."""
33

4+
import os
5+
46
from scikit_build_core import build as _orig
57

68
from .find_pytorch import (
@@ -39,10 +41,15 @@ def __dir__() -> list[str]:
3941
def get_requires_for_build_wheel(
4042
config_settings: dict,
4143
) -> list[str]:
44+
if os.environ.get("CIBUILDWHEEL", "0") == "1":
45+
cibw_deps = ["mpich"]
46+
else:
47+
cibw_deps = []
4248
return (
4349
_orig.get_requires_for_build_wheel(config_settings)
4450
+ find_tensorflow()[1]
4551
+ find_pytorch()[1]
52+
+ cibw_deps
4653
)
4754

4855

backend/find_pytorch.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ def get_pt_requirement(pt_version: str = "") -> dict:
124124
raise RuntimeError("Unsupported CUDA version") from None
125125
if pt_version == "":
126126
pt_version = os.environ.get("PYTORCH_VERSION", "")
127+
if os.environ.get("CIBUILDWHEEL", "0") == "1":
128+
# PyTorch OP library is built against mpich
129+
mpi_requirement = ["mpich"]
130+
else:
131+
mpi_requirement = []
127132

128133
return {
129134
"torch": [
@@ -134,7 +139,8 @@ def get_pt_requirement(pt_version: str = "") -> dict:
134139
f"torch=={Version(pt_version).base_version}.*"
135140
if pt_version != ""
136141
# https://github.com/pytorch/pytorch/commit/7e0c26d4d80d6602aed95cb680dfc09c9ce533bc
137-
else "torch>=2.1.0"
142+
else "torch>=2.1.0",
143+
*mpi_requirement,
138144
],
139145
}
140146

0 commit comments

Comments
 (0)