Skip to content

Commit e4a66c3

Browse files
author
jiyuang
committed
Merge branch 'develop' of https://github.com/1041176461/abacus-develop into develop
2 parents 40cd127 + a634397 commit e4a66c3

File tree

854 files changed

+53682
-23576
lines changed

Some content is hidden

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

854 files changed

+53682
-23576
lines changed

.github/workflows/cuda.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CUDA Test
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
start-runner:
8+
name: Start self-hosted EC2 runner
9+
runs-on: ubuntu-latest
10+
outputs:
11+
label: ${{ steps.start-ec2-runner.outputs.label }}
12+
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
13+
steps:
14+
- name: Configure AWS credentials
15+
uses: aws-actions/configure-aws-credentials@v1
16+
with:
17+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
18+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
19+
aws-region: us-east-2
20+
- name: Start EC2 runner
21+
id: start-ec2-runner
22+
uses: machulav/ec2-github-runner@v2
23+
with:
24+
mode: start
25+
github-token: ${{ secrets.PAT }}
26+
ec2-image-id: ami-04cd9fec4a7a39019
27+
ec2-instance-type: g4dn.xlarge
28+
subnet-id: subnet-72d3e53e
29+
security-group-id: sg-06b0c93122c08aeab
30+
31+
test:
32+
name: Do the job on the runner
33+
needs: start-runner # required to start the main job when the runner is ready
34+
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
35+
container:
36+
image: ghcr.io/deepmodeling/abacus-development-kit:cuda
37+
options: --gpus all
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v3
41+
- name: Build cuSolver
42+
run: |
43+
nvidia-smi
44+
cmake -B build -DUSE_CUSOLVER_LCAO=ON
45+
cmake --build build -j4
46+
cmake --install build
47+
cmake -B build -DBUILD_TESTING=ON
48+
cmake --build build -j4 --target hsolver_diago
49+
- name: Test e2e
50+
run: |
51+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
52+
cd tests/integrate
53+
echo "ks_solver cusolver" >> ./270_NO_MD_2O/INPUT
54+
./Autotest.sh -r 270_NO_MD_2O
55+
- name: Test UT
56+
run: |
57+
cd source/src_pdiag/test/
58+
cp ../../../build/source/src_pdiag/test/hsolver_diago .
59+
./hsolver_diago
60+
bash diago_parallel_test.sh
61+
- name: Test performance
62+
run: |
63+
cd examples/performance
64+
ls -d P1*lcao* > allcase
65+
sed -i '/ks_solver/d' P1*lcao*/INPUT
66+
sed -i '$a ks_solver cusolver' P1*lcao*/INPUT
67+
bash run.sh
68+
cat sumall.dat
69+
70+
71+
stop-runner:
72+
name: Stop self-hosted EC2 runner
73+
needs:
74+
- start-runner # required to get output from the start-runner job
75+
- test # required to wait when the main job is done
76+
runs-on: ubuntu-latest
77+
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
78+
steps:
79+
- name: Configure AWS credentials
80+
uses: aws-actions/configure-aws-credentials@v1
81+
with:
82+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
83+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
84+
aws-region: us-east-2
85+
- name: Stop EC2 runner
86+
uses: machulav/ec2-github-runner@v2
87+
with:
88+
mode: stop
89+
github-token: ${{ secrets.PAT }}
90+
label: ${{ needs.start-runner.outputs.label }}
91+
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

.github/workflows/container.yml renamed to .github/workflows/devcontainer.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
jobs:
99
build_container_and_push:
1010
runs-on: ubuntu-latest
11+
if: github.repository_owner == 'deepmodeling'
1112
strategy:
1213
matrix:
1314
dockerfile: ["gnu","intel","cuda"]
@@ -25,10 +26,19 @@ jobs:
2526
username: ${{ github.actor }}
2627
password: ${{ secrets.GITHUB_TOKEN }}
2728

29+
- name: Login to Aliyun Registry
30+
uses: docker/login-action@v1
31+
with:
32+
registry: ${{ secrets.DP_HARBOR_REGISTRY }}
33+
username: ${{ secrets.DP_HARBOR_USERNAME }}
34+
password: ${{ secrets.DP_HARBOR_PASSWORD }}
35+
2836
- name: Build and Push Container
2937
uses: docker/build-push-action@v2
3038
with:
31-
tags: ghcr.io/${{ github.repository_owner }}/abacus-development-kit:${{ matrix.dockerfile }}
39+
tags: |
40+
ghcr.io/${{ github.repository_owner }}/abacus-development-kit:${{ matrix.dockerfile }}
41+
${{ secrets.DP_HARBOR_REGISTRY }}/dplc/abacus-${{ matrix.dockerfile }}:latest
3242
file: Dockerfile.${{ matrix.dockerfile }}
3343
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/abacus-development-kit:${{matrix.dockerfile}}
3444
cache-to: type=inline

.github/workflows/image.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build Image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'v*'
8+
jobs:
9+
build_container_and_push:
10+
runs-on: ubuntu-latest
11+
if: github.repository_owner == 'deepmodeling'
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Docker meta
17+
id: meta
18+
uses: docker/metadata-action@v4
19+
with:
20+
images: |
21+
ghcr.io/${{ github.repository_owner }}/abacus
22+
${{ secrets.DP_HARBOR_REGISTRY }}/dplc/abacus
23+
tags: |
24+
type=semver,pattern={{version}}
25+
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }}
26+
27+
- name: Setup Docker Buildx
28+
uses: docker/setup-buildx-action@v1
29+
30+
- name: Login to GitHub Container Registry
31+
uses: docker/login-action@v1
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Login to Aliyun Registry
38+
uses: docker/login-action@v1
39+
with:
40+
registry: ${{ secrets.DP_HARBOR_REGISTRY }}
41+
username: ${{ secrets.DP_HARBOR_USERNAME }}
42+
password: ${{ secrets.DP_HARBOR_PASSWORD }}
43+
44+
- name: Build and Push Container
45+
uses: docker/build-push-action@v2
46+
with:
47+
tags: ${{ steps.meta.outputs.tags }}
48+
file: Dockerfile
49+
push: true
50+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/performance.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Performance test
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
name: Performance test
9+
runs-on: self-hosted
10+
strategy:
11+
matrix:
12+
tag: ["gnu", "intel"]
13+
if: github.repository_owner == 'deepmodeling'
14+
container: ghcr.io/${{ github.repository_owner }}/abacus-development-kit:${{ matrix.tag }}
15+
timeout-minutes: 2880
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Install Requirements
20+
run: |
21+
apt install -y time
22+
- name: Build
23+
run: |
24+
cmake -B build -DENABLE_LIBXC=ON
25+
cmake --build build -j16
26+
cmake --install build
27+
- name: Test
28+
run: |
29+
test -e /opt/intel/oneapi/setvars.sh && . /opt/intel/oneapi/setvars.sh
30+
cd examples/performance/
31+
bash run.sh
32+
- name: Show Result
33+
run: |
34+
cat examples/performance/sumall.dat

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
ref: "refs/pull/${{ github.event.number }}/merge"
1717
- name: Build
1818
run: |
19-
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON
19+
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON
2020
cmake --build build -j8
2121
cmake --install build
2222
- name: Test

0 commit comments

Comments
 (0)