Skip to content

Commit e0f5436

Browse files
committed
merge to abacus-v3.7.5, but don't debug(many, because many functions and interfaces have changed)
2 parents 787eac6 + ba0cb21 commit e0f5436

File tree

2,488 files changed

+217210
-168657
lines changed

Some content is hidden

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

2,488 files changed

+217210
-168657
lines changed

.clang-format

Lines changed: 27 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,50 @@
11
---
2-
Language: Cpp
2+
Language: Cpp
33
BasedOnStyle: Microsoft
44

5-
AlignArrayOfStructures: Left
65
AlwaysBreakTemplateDeclarations: Yes
76

8-
AllowAllArgumentsOnNextLine: 'false'
9-
AllowAllParametersOfDeclarationOnNextLine: 'false'
10-
BinPackArguments: 'false'
11-
BinPackParameters: 'false'
7+
AllowAllArgumentsOnNextLine: false
8+
AllowAllParametersOfDeclarationOnNextLine: false
9+
BinPackArguments: false
10+
BinPackParameters: false
1211

1312
BreakBeforeBinaryOperators: All
14-
BreakBeforeTernaryOperators: 'true'
13+
BreakBeforeTernaryOperators: true
1514

16-
Cpp11BracedListStyle: 'true'
17-
FixNamespaceComments: 'true'
15+
Cpp11BracedListStyle: true
16+
FixNamespaceComments: true
17+
18+
# InsertBraces: true # only for clang-format version15.0.0 or later
1819

1920
# About include
20-
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
21+
IncludeBlocks: Regroup
3822
IncludeIsMainRegex: '([-_](test|unittest))?$'
3923
IncludeIsMainSourceRegex: ''
4024

41-
IndentWidth: '4'
25+
IndentWidth: 4
4226
IndentWrappedFunctionNames: true
4327

4428
# About Point
4529
DerivePointerAlignment: false
4630
PointerAlignment: Left
4731

48-
PackConstructorInitializers: NextLine
49-
50-
ReflowComments: 'true'
51-
SortIncludes: 'true'
52-
SortUsingDeclarations: 'true'
32+
ReflowComments: true
33+
SortIncludes: true
34+
SortUsingDeclarations: true
5335

5436
# About space
55-
SpaceAfterCStyleCast: 'false'
56-
SpaceAfterLogicalNot: 'false'
57-
SpaceBeforeRangeBasedForLoopColon: 'false'
58-
SpaceInEmptyParentheses: 'false'
59-
SpacesInAngles: 'false'
60-
SpacesInCStyleCastParentheses: 'false'
61-
SpacesInContainerLiterals: 'false'
62-
SpacesInParentheses: 'false'
63-
SpacesInSquareBrackets: 'false'
64-
65-
Standard: Cpp11
66-
TabWidth: '4'
37+
SpaceAfterCStyleCast: false
38+
SpaceAfterLogicalNot: false
39+
SpaceBeforeRangeBasedForLoopColon: false
40+
SpaceInEmptyParentheses: false
41+
SpacesInAngles: false
42+
SpacesInCStyleCastParentheses: false
43+
SpacesInContainerLiterals: false
44+
SpacesInParentheses: false
45+
SpacesInSquareBrackets: false
46+
47+
Standard: c++11
48+
TabWidth: 4
6749
UseTab: Never
6850
...

.clang-tidy

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
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+
modernize-deprecated-headers,
4+
modernize-redundant-void-arg,
5+
modernize-use-bool-literals,
6+
modernize-use-nullptr,
7+
readability-avoid-return-with-void-value,
8+
readability-braces-around-statements
9+
10+
# llvm-header-guard,
11+
# bugprone-*,
12+
# clang-analyzer-*,
13+
# clang-diagnostic-*,
14+
# cppcoreguidelines-avoid-non-const-global-variables,
15+
# cppcoreguidelines-macro-usage,
16+
# cppcoreguidelines-pro-type-member-init,
17+
# fuchsia-multiple-inheritance,
18+
# google-*,
19+
# -google-runtime-references,
20+
# misc-*,
21+
# modernize-shrink-to-fit,
22+
# modernize-use-starts-ends-with,
23+
# mpi-*,
24+
# performance-*,
25+
# -performance-avoid-endl,
26+
# readability-*,
27+
# -readability-else-after-return,
28+
# -readability-magic-numbers,
29+
# -readability-isolate-declaration,
30+
# -readability-braces-around-statements,
31+
# -readability-implicit-bool-conversion,
32+
# -google-readability-braces-around-statements,
33+
# -misc-unused-parameters,
34+
# -modernize-pass-by-value,
35+
# -modernize-use-auto,
36+
# -google-readability-casting,
37+
# -readability-make-member-function-const,
38+
# -cppcoreguidelines-avoid-non-const-global-variables,
39+
# -readability-function-cognitive-complexity,
40+
# -google-build-using-namespace,
41+
# -bugprone-narrowing-conversions,
42+
'
543
...

.github/pull_request_template.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
### Reminder
22
- [ ] Have you linked an issue with this pull request?
3+
- [ ] Have you added adequate unit tests and/or case tests for your pull request?
34
- [ ] Have you noticed possible changes of behavior below or in the linked issue?
45
- [ ] Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)
56

67
### Linked Issue
78
Fix #...
89

10+
### Unit Tests and/or Case Tests for my changes
11+
- A unit test is added for each new feature or bug fix.
12+
913
### What's changed?
1014
- Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...
1115

.github/workflows/build_test_cmake.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ jobs:
3030
build_args: "-DENABLE_LCAO=OFF"
3131
name: "Build without LCAO"
3232
- tag: gnu
33-
build_args: "-DUSE_ELPA=0"
33+
build_args: "-DUSE_ELPA=0 "
3434
name: "Build without ELPA"
3535
- tag: gnu
3636
build_args: "-DENABLE_MPI=0"
37+
name: "Build without MPI"
38+
- tag: gnu
39+
build_args: "-DENABLE_MPI=0 -DENABLE_LCAO=0"
3740
name: "Build without LCAO and MPI"
3841

3942
name: ${{ matrix.name }}

.github/workflows/coverage.yml

Lines changed: 4 additions & 3 deletions
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
@@ -27,7 +27,8 @@ jobs:
2727
run: |
2828
cmake --build build --target test ARGS="-V --timeout 21600"
2929
- name: Upload Coverage to Codecov
30-
uses: codecov/codecov-action@v3
30+
uses: codecov/codecov-action@v4
3131
if: ${{ ! cancelled() }}
3232
with:
3333
gcov: true
34+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/cuda.yml

Lines changed: 24 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,42 @@ name: CUDA Test
22

33
on:
44
workflow_dispatch:
5+
pull_request:
56

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@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
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
3010

11+
jobs:
3112
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
13+
name: Test on CUDA Build
14+
runs-on: nvidia
15+
if: github.repository_owner == 'deepmodeling'
3516
container:
3617
image: ghcr.io/deepmodeling/abacus-cuda
18+
volumes:
19+
- /tmp/ccache:/github/home/.ccache
3720
options: --gpus all
21+
3822
steps:
3923
- name: Checkout
4024
uses: actions/checkout@v4
41-
- name: Build cuSolver
25+
with:
26+
submodules: recursive
27+
28+
- name: Install Ccache
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y ccache
32+
33+
- name: Build
4234
run: |
4335
nvidia-smi
44-
cmake -B build -DUSE_CUSOLVER_LCAO=ON
36+
cmake -B build -DUSE_CUDA=ON -DBUILD_TESTING=ON
4537
cmake --build build -j4
4638
cmake --install build
47-
cmake -B build -DBUILD_TESTING=ON
48-
cmake --build build -j4 --target hsolver_diago
49-
- name: Test e2e
39+
40+
- name: Test
5041
run: |
51-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
5242
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 }}
43+
bash Autotest.sh -n 2 -f CASES_GPU.txt

.github/workflows/devcontainer.yml

Lines changed: 21 additions & 7 deletions
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+
dp-harbor-registry.us-east-1.cr.aliyuncs.com/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

@@ -29,17 +43,17 @@ jobs:
2943
- name: Login to Aliyun Registry
3044
uses: docker/login-action@v3
3145
with:
32-
registry: registry.dp.tech
46+
registry: dp-harbor-registry.us-east-1.cr.aliyuncs.com
47+
# AliCloud automatically mirrors to registry.dp.tech
3348
username: ${{ secrets.DP_HARBOR_USERNAME }}
3449
password: ${{ secrets.DP_HARBOR_PASSWORD }}
3550

3651
- name: Build and Push Container
37-
uses: docker/build-push-action@v5
52+
uses: docker/build-push-action@v6
3853
with:
39-
tags: |
40-
ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
41-
registry.dp.tech/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}
4256
file: Dockerfile.${{ matrix.dockerfile }}
57+
push: true
4358
cache-from: type=registry,ref=ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
4459
cache-to: type=inline
45-
push: true

0 commit comments

Comments
 (0)