Skip to content

Commit

Permalink
Merge devel into master (#2380)
Browse files Browse the repository at this point in the history
  • Loading branch information
amcadmus committed Mar 14, 2023
2 parents 89d0d23 + a34e680 commit 6cdc5bf
Show file tree
Hide file tree
Showing 767 changed files with 279,619 additions and 56,078 deletions.
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
BasedOnStyle: Google
BinPackParameters: false
...
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# .git-blame-ignore-revs
# pre-commit
97c38bb4235c9a440bd61a2459e330dba78269fa
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
attributes:
label: Bug summary
description: Please provide a clear and concise description of what the bug is.
placeholder:
placeholder:
value:
validations:
required: true
Expand Down Expand Up @@ -45,7 +45,7 @@ body:
attributes:
label: Input Files, Running Commands, Error Log, etc.
description: "Please provide necessary information including input file, running commands, error log , etc., AS DETAILED AS POSSIBLE to help locate and reproduce your problem. WARNING: Do not use image to show error log! Paste texts in a code block instead."
placeholder:
placeholder:
value:
validations:
required: true
Expand All @@ -54,7 +54,7 @@ body:
attributes:
label: Steps to Reproduce
description: "Describe the steps required to (quickly) reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create an input set that is as minimal and small as possible and reproduces the bug as quickly as possible. **NOTE:** the less effort and time it takes to reproduce your reported bug, the more likely it becomes, that somebody will look into it and fix the problem."
placeholder:
placeholder:
value:
validations:
required: true
Expand All @@ -63,7 +63,7 @@ body:
attributes:
label: Further Information, Files, and Links
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications
placeholder:
placeholder:
value:
validations:
required: false
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
attributes:
label: Summary
description: "Please provide a brief and concise description of the suggested feature or change"
placeholder:
placeholder:
value:
validations:
required: true
Expand All @@ -18,7 +18,7 @@ body:
attributes:
label: Detailed Description
description: "Please explain how you would like to see deepmd-kit enhanced, what feature(s) you are looking for, what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation. If applicable add a reference to an existing bug report or issue that this will address."
placeholder:
placeholder:
value:
validations:
required: true
Expand All @@ -27,7 +27,7 @@ body:
attributes:
label: Further Information, Files, and Links
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications
placeholder:
placeholder:
value:
validations:
required: false
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/generic-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
attributes:
label: Summary
description: "Please provide a clear and concise description of what the question is."
placeholder:
placeholder:
value:
validations:
required: true
Expand All @@ -32,7 +32,7 @@ body:
attributes:
label: Python Version, CUDA Version, GCC Version, LAMMPS Version, etc
description: "If applicable, specify what platform you are running on."
placeholder:
placeholder:
value:
validations:
required: false
Expand All @@ -41,7 +41,7 @@ body:
attributes:
label: Details
description: "Please explain the issue in detail here."
placeholder:
placeholder:
value:
validations:
required: true
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
attributes:
label: Summary
description: "Please provide a clear and concise description of what your request is."
placeholder:
placeholder:
value:
validations:
required: true
Expand All @@ -18,7 +18,7 @@ body:
attributes:
label: Detailed Description
description: "Please explain how you would like to see deepmd-kit enhanced. Specify your material system, and exactly what behaviors or properties you are looking for, or what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation."
placeholder:
placeholder:
value:
validations:
required: true
Expand All @@ -27,7 +27,7 @@ body:
attributes:
label: Further Information, Files, and Links
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications
placeholder:
placeholder:
value:
validations:
required: false
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "devel"
39 changes: 34 additions & 5 deletions .github/workflows/build_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,37 @@ jobs:
name: Build C++
runs-on: ubuntu-latest
container: ghcr.io/deepmodeling/deepmd-kit-test-cc:latest
strategy:
strategy:
matrix:
include:
- variant: cpu
dp_variant: cpu
- variant: cuda
dp_variant: cuda
- variant: cuda120
dp_variant: cuda
- variant: rocm
dp_variant: rocm
- variant: clang
dp_variant: clang
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@master
- uses: actions/checkout@v3
with:
submodules: true
- run: apt-get update && apt-get install -y nvidia-cuda-toolkit
if: matrix.variant == 'cuda'
- run: |
apt-get update \
&& apt-get -y install wget \
&& wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
&& dpkg -i cuda-keyring_1.0-1_all.deb \
&& apt-get update \
&& apt-get -y install cuda-12-0
if: matrix.variant == 'cuda120'
env:
DEBIAN_FRONTEND: noninteractive
- run: |
apt-get update && apt-get install -y gnupg2 \
&& echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.3/ jammy main' | tee /etc/apt/sources.list.d/rocm.list \
Expand All @@ -31,10 +47,10 @@ jobs:
&& apt-get install -y rocm-dev hipcub-dev
if: matrix.variant == 'rocm'
- run: apt-get update && apt-get install -y clang
if: matrix.variant == 'clang'
if: matrix.variant == 'clang'
- run: source/install/build_cc.sh
env:
DP_VARIANT: ${{ matrix.variant }}
DP_VARIANT: ${{ matrix.dp_variant }}
DOWNLOAD_TENSORFLOW: "FALSE"
if: matrix.variant != 'clang'
- run: source/install/build_cc.sh
Expand All @@ -44,9 +60,22 @@ jobs:
CC: clang
CXX: clang++
if: matrix.variant == 'clang'
- name: Test files exist
run: |
test -f dp/bin/dp_ipi &&
test -f dp/lib/libdeepmd_cc.so &&
test -f dp/lib/libdeepmd_c.so &&
test -f dp/lib/libdeepmd_op.so &&
test -f dp/lib/libdeepmd_ipi.so &&
test -f dp/lib/libdeepmd_lmp.so &&
test -f dp/lib/libdeepmd.so
pass:
name: Pass building C++
needs: [buildcc]
runs-on: ubuntu-latest
if: always()
steps:
- run: echo "All jobs passed"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
54 changes: 46 additions & 8 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
# https://github.com/pypa/setuptools_scm/issues/480
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
name: Setup QEMU
if: matrix.platform_id == 'manylinux_aarch64'
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'

- run: python -m pip install cibuildwheel==2.11.3
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
uses: pypa/cibuildwheel@v2.11.3
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: all
Expand Down Expand Up @@ -83,7 +79,49 @@ jobs:
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
- uses: pypa/gh-action-pypi-publish@v4
with:
user: __token__
password: ${{ secrets.pypi_password }}

build_docker:
# use the already built wheels to build docker
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: artifact
path: source/install/docker/dist
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ghcr.io/deepmodeling/deepmd-kit

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: source/install/docker
push: ${{ github.repository_owner == 'deepmodeling' && github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

pass:
name: Pass testing build wheels
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: always()
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
35 changes: 0 additions & 35 deletions .github/workflows/lint_python.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@master
- uses: actions/checkout@v3
- run: source/install/test_cc_local.sh
env:
OMP_NUM_THREADS: 1
Expand Down Expand Up @@ -39,5 +39,9 @@ jobs:
name: Pass testing C++
needs: [testcc]
runs-on: ubuntu-latest
if: always()
steps:
- run: echo "All jobs passed"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
13 changes: 9 additions & 4 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
testpython:
name: Test Python
runs-on: ubuntu-latest
strategy:
strategy:
matrix:
include:
- python: 3.7
Expand Down Expand Up @@ -38,8 +38,9 @@ jobs:
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@master
- run: python -m pip install -U pip>=21.3.1
- uses: actions/checkout@v3
# https://github.com/pypa/pip/issues/11770
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
- run: pip install -e .[cpu,test]
env:
CC: gcc-${{ matrix.gcc }}
Expand All @@ -55,5 +56,9 @@ jobs:
name: Pass testing Python
needs: [testpython]
runs-on: ubuntu-latest
if: always()
steps:
- run: echo "All jobs passed"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*.gz
*.bz2
*.pyc
*.pb
tmp*
CMakeCache.txt
CMakeFiles
Expand Down

0 comments on commit 6cdc5bf

Please sign in to comment.