Skip to content

Commit 188c132

Browse files
committed
Merge branch 'master' of https://github.com/sunliang98/abacus-develop into ML_KEDF-2.0
2 parents 95481db + c4db904 commit 188c132

File tree

398 files changed

+37367
-43794
lines changed

Some content is hidden

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

398 files changed

+37367
-43794
lines changed

.clang-format

-20
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Language: Cpp
33
BasedOnStyle: Microsoft
44

5-
AlignArrayOfStructures: Right
65
AlwaysBreakTemplateDeclarations: Yes
76

87
AllowAllArgumentsOnNextLine: false
@@ -18,23 +17,6 @@ FixNamespaceComments: true
1817

1918
# About include
2019
IncludeBlocks: Regroup
21-
IncludeCategories:
22-
- Regex: '^<ext/.*\.h>'
23-
Priority: 2
24-
SortPriority: 0
25-
CaseSensitive: false
26-
- Regex: '^<.*\.h>'
27-
Priority: 1
28-
SortPriority: 0
29-
CaseSensitive: false
30-
- Regex: '^<.*'
31-
Priority: 2
32-
SortPriority: 0
33-
CaseSensitive: false
34-
- Regex: '.*'
35-
Priority: 3
36-
SortPriority: 0
37-
CaseSensitive: false
3820
IncludeIsMainRegex: '([-_](test|unittest))?$'
3921
IncludeIsMainSourceRegex: ''
4022

@@ -45,8 +27,6 @@ IndentWrappedFunctionNames: true
4527
DerivePointerAlignment: false
4628
PointerAlignment: Left
4729

48-
PackConstructorInitializers: NextLine
49-
5030
ReflowComments: true
5131
SortIncludes: true
5232
SortUsingDeclarations: true

.clang-tidy

+33-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
---
2-
Checks: '-*,clang-diagnostic-*,clang-analyzer-*,google-*,llvm-header-guard,cppcoreguidelines-avoid-non-const-global-variables,cppcoreguidelines-init-variables,cppcoreguidelines-pro-type-member-init,fuchsia-multiple-inheritance,misc-non-private-member-variables-in-classes,readability-make-member-function-const,readability-function-size,misc-unused-parameters,readability-non-const-parameter,cppcoreguidelines-macro-usage,modernize-use-nullptr,modernize-deprecated-headers'
3-
FormatStyle: none
4-
CheckOptions:
2+
Checks: '
3+
-*,
4+
bugprone-*,
5+
clang-analyzer-*,
6+
clang-diagnostic-*,
7+
cppcoreguidelines-avoid-non-const-global-variables,
8+
cppcoreguidelines-macro-usage,
9+
cppcoreguidelines-pro-type-member-init,
10+
fuchsia-multiple-inheritance,
11+
google-*,
12+
-google-runtime-references,
13+
llvm-header-guard,
14+
misc-*,
15+
modernize-deprecated-headers,
16+
modernize-redundant-void-arg,
17+
modernize-use-nullptr,
18+
modernize-use-bool-literals,
19+
modernize-use-auto,
20+
modernize-use-std-numbers,
21+
modernize-pass-by-value,
22+
modernize-shrink-to-fit,
23+
mpi-*,
24+
performance-*,
25+
-performance-avoid-endl,
26+
readability-*,
27+
-readability-magic-numbers,
28+
-readability-isolate-declaration,
29+
-readability-braces-around-statements,
30+
-readability-implicit-bool-conversion,
31+
-google-readability-braces-around-statements,
32+
-misc-unused-parameters,
33+
'
34+
FormatStyle: file
535
...

.github/workflows/coverage.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
jobs:
99
test-coverage:
1010
name: Generate Coverage Report
11-
runs-on: self-hosted
12-
container: ghcr.io/deepmodeling/abacus-development-kit:gnu
11+
runs-on: X64
12+
container: ghcr.io/deepmodeling/abacus-gnu
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4

.github/workflows/cuda.yml

+9-72
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,27 @@ name: CUDA Test
22

33
on:
44
workflow_dispatch:
5+
pull_request:
56

67
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@v4
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-
318
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
9+
name: Test on CUDA Build
10+
runs-on: nvidia
3511
container:
3612
image: ghcr.io/deepmodeling/abacus-cuda
3713
options: --gpus all
3814
steps:
3915
- name: Checkout
4016
uses: actions/checkout@v4
41-
- name: Build cuSolver
17+
with:
18+
submodules: recursive
19+
- name: Build
4220
run: |
4321
nvidia-smi
44-
cmake -B build -DUSE_CUSOLVER_LCAO=ON
22+
cmake -B build -DUSE_CUDA=ON -DBUILD_TESTING=ON
4523
cmake --build build -j4
4624
cmake --install build
47-
cmake -B build -DBUILD_TESTING=ON
48-
cmake --build build -j4 --target hsolver_diago
49-
- name: Test e2e
25+
- name: Test
5026
run: |
51-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
5227
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@v4
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 }}
28+
bash Autotest.sh -n 2 -f CASES_GPU.txt

.github/workflows/devcontainer.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ on:
44
push:
55
branches:
66
- develop
7+
tags:
8+
- 'v*'
9+
workflow_dispatch:
710

811
jobs:
912
build_container_and_push:
10-
runs-on: self-hosted
13+
runs-on: X64
1114
if: github.repository_owner == 'deepmodeling'
1215
strategy:
1316
matrix:
@@ -16,6 +19,17 @@ jobs:
1619
- name: Checkout
1720
uses: actions/checkout@v4
1821

22+
- name: Docker meta
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
images: |
27+
ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}
28+
registry.dp.tech/deepmodeling/abacus-${{ matrix.dockerfile }}
29+
tags: |
30+
type=semver,pattern={{version}},enable=${{ github.ref_type == 'tag' }}
31+
type=raw,value=latest
32+
1933
- name: Setup Docker Buildx
2034
uses: docker/setup-buildx-action@v3
2135

@@ -36,10 +50,9 @@ jobs:
3650
- name: Build and Push Container
3751
uses: docker/build-push-action@v5
3852
with:
39-
tags: |
40-
ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
41-
registry.dp.tech/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
4255
file: Dockerfile.${{ matrix.dockerfile }}
56+
push: true
4357
cache-from: type=registry,ref=ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
4458
cache-to: type=inline
45-
push: true

.github/workflows/dynamic.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
test:
1010
name: Dynamic analysis
11-
runs-on: self-hosted
11+
runs-on: X64
1212
if: github.repository_owner == 'deepmodeling'
1313
container: ghcr.io/deepmodeling/abacus-gnu
1414
steps:

.github/workflows/image.yml

-50
This file was deleted.

.github/workflows/mirror_gitee.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Mirror to Gitee Repository
2+
3+
on: [ push, delete, create ]
4+
5+
# Ensures that only one mirror task will run at a time.
6+
concurrency:
7+
group: git-mirror
8+
9+
jobs:
10+
git-mirror:
11+
uses: deepmodeling/workflows/.github/workflows/mirror_gitee.yml@main
12+
secrets:
13+
SYNC_GITEE_PRIVATE_KEY: ${{ secrets.SYNC_GITEE_PRIVATE_KEY }}

.github/workflows/performance.yml

+2-54
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,9 @@ on:
44
workflow_dispatch:
55

66
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@v4
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: c5.9xlarge
28-
subnet-id: subnet-72d3e53e
29-
security-group-id: sg-06b0c93122c08aeab
30-
317
test:
328
name: Performance test
33-
needs: start-runner
34-
runs-on: ${{ needs.start-runner.outputs.label }}
9+
runs-on: X64
3510
strategy:
3611
matrix:
3712
tag: ["gnu", "intel"]
@@ -43,39 +18,12 @@ jobs:
4318
- name: Install Requirements
4419
run: |
4520
apt install -y time
46-
- name: Build
47-
run: |
48-
cmake -B build -DENABLE_LIBXC=ON
49-
cmake --build build -j`nproc`
50-
cmake --install build
5121
- name: Test
5222
run: |
53-
test -e /opt/intel/oneapi/setvars.sh && . /opt/intel/oneapi/setvars.sh
23+
. /opt/intel/oneapi/setvars.sh || :
5424
cd tests/performance/
5525
bash run.sh
5626
- name: Show Result
5727
if: always()
5828
run: |
5929
cat tests/performance/sumall.dat
60-
61-
stop-runner:
62-
name: Stop self-hosted EC2 runner
63-
needs:
64-
- start-runner # required to get output from the start-runner job
65-
- test # required to wait when the main job is done
66-
runs-on: ubuntu-latest
67-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
68-
steps:
69-
- name: Configure AWS credentials
70-
uses: aws-actions/configure-aws-credentials@v4
71-
with:
72-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
73-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
74-
aws-region: us-east-2
75-
- name: Stop EC2 runner
76-
uses: machulav/ec2-github-runner@v2
77-
with:
78-
mode: stop
79-
github-token: ${{ secrets.PAT }}
80-
label: ${{ needs.start-runner.outputs.label }}
81-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

0 commit comments

Comments
 (0)