Skip to content

Commit a9e9ecd

Browse files
Merge
2 parents 3fd4dc6 + 025e574 commit a9e9ecd

File tree

3,856 files changed

+95887
-742599
lines changed

Some content is hidden

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

3,856 files changed

+95887
-742599
lines changed

.github/workflows/build_test_cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: "Build with Intel toolchain"
1818

1919
- tag: gnu
20-
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1 -DENABLE_PAW=1"
20+
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1"
2121
name: "Build extra components with GNU toolchain"
2222
- tag: intel
2323
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1"

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
apt update && apt install -y lcov gpg curl jq ca-certificates
1919
- name: Building
2020
run: |
21-
cmake -B build -DENABLE_COVERAGE=ON -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON
21+
cmake -B build -DENABLE_COVERAGE=ON -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON
2222
cmake --build build -j`nproc`
2323
cmake --install build
2424
- name: Testing

.github/workflows/cuda.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,27 @@ jobs:
3737
cmake --build build -j4
3838
cmake --install build
3939
40-
- name: Test
40+
- name: Test 11_PW_GPU
4141
run: |
42-
cd tests/integrate
43-
bash Autotest.sh -n 2 -f CASES_GPU.txt
42+
cd tests/11_PW_GPU
43+
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt
44+
45+
- name: Test 12_NAO_Gamma_GPU
46+
run: |
47+
cd tests/12_NAO_Gamma_GPU
48+
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt
49+
50+
- name: Test 13_NAO_multik_GPU
51+
run: |
52+
cd tests/13_NAO_multik_GPU
53+
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt
54+
55+
- name: Test 15_rtTDDFT_GPU
56+
run: |
57+
cd tests/15_rtTDDFT_GPU
58+
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt
59+
60+
- name: Test 16_SDFT_GPU
61+
run: |
62+
cd tests/16_SDFT_GPU
63+
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt

.github/workflows/test.yml

Lines changed: 130 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: Configure
3333
run: |
34-
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_MLKEDF=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1
34+
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_MLKEDF=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DENABLE_FLOAT_FFTW=ON
3535
3636
# Temporarily removed because no one maintains this now.
3737
# And it will break the CI test workflow.
@@ -48,9 +48,136 @@ jobs:
4848
run: |
4949
cmake --build build -j8
5050
cmake --install build
51-
- name: Test
51+
52+
- name: Integrated Tests Preparation
53+
env:
54+
GTEST_COLOR: 'yes'
55+
OMP_NUM_THREADS: '2'
56+
run: |
57+
cmake --build build --target test ARGS="-V --timeout 1700 -R integrated_test"
58+
59+
- name: Module_Base Unittests
60+
env:
61+
GTEST_COLOR: 'yes'
62+
OMP_NUM_THREADS: '2'
63+
run: |
64+
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_BASE"
65+
66+
- name: Module_IO Unittests
67+
env:
68+
GTEST_COLOR: 'yes'
69+
OMP_NUM_THREADS: '2'
70+
run: |
71+
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_IO"
72+
73+
- name: Module_HSolver Unittests
74+
env:
75+
GTEST_COLOR: 'yes'
76+
OMP_NUM_THREADS: '2'
77+
run: |
78+
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_HSOLVER"
79+
80+
- name: Module_Cell Unittests
81+
env:
82+
GTEST_COLOR: 'yes'
83+
OMP_NUM_THREADS: '2'
84+
run: |
85+
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_CELL"
86+
87+
- name: Module_MD Unittests
88+
env:
89+
GTEST_COLOR: 'yes'
90+
OMP_NUM_THREADS: '2'
91+
run: |
92+
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_MD"
93+
94+
- name: Module_Psi Unittests
95+
env:
96+
GTEST_COLOR: 'yes'
97+
OMP_NUM_THREADS: '2'
98+
run: |
99+
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_PSI"
100+
101+
- name: Module_RI Unittests
102+
env:
103+
GTEST_COLOR: 'yes'
104+
OMP_NUM_THREADS: '2'
105+
run: |
106+
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_RI"
107+
108+
- name: 01_PW Test
109+
env:
110+
GTEST_COLOR: 'yes'
111+
OMP_NUM_THREADS: '2'
112+
run: |
113+
cmake --build build --target test ARGS="-V --timeout 1700 -R 01_PW"
114+
115+
- name: 02_NAO_Gamma Test
116+
env:
117+
GTEST_COLOR: 'yes'
118+
OMP_NUM_THREADS: '2'
119+
run: |
120+
cmake --build build --target test ARGS="-V --timeout 1700 -R 02_NAO_Gamma"
121+
122+
- name: 03_NAO_multik Test
123+
env:
124+
GTEST_COLOR: 'yes'
125+
OMP_NUM_THREADS: '2'
126+
run: |
127+
cmake --build build --target test ARGS="-V --timeout 1700 -R 03_NAO_multik"
128+
129+
- name: 04_LJ_DP Test
130+
env:
131+
GTEST_COLOR: 'yes'
132+
OMP_NUM_THREADS: '2'
133+
run: |
134+
cmake --build build --target test ARGS="-V --timeout 1700 -R 04_LJ_DP"
135+
136+
- name: 05_rtTDDFT Test
137+
env:
138+
GTEST_COLOR: 'yes'
139+
OMP_NUM_THREADS: '2'
140+
run: |
141+
cmake --build build --target test ARGS="-V --timeout 1700 -R 05_rtTDDFT"
142+
143+
- name: 06_SDFT Test
144+
env:
145+
GTEST_COLOR: 'yes'
146+
OMP_NUM_THREADS: '2'
147+
run: |
148+
cmake --build build --target test ARGS="-V --timeout 1700 -R 06_SDFT"
149+
150+
- name: 07_OFDFT Test
151+
env:
152+
GTEST_COLOR: 'yes'
153+
OMP_NUM_THREADS: '2'
154+
run: |
155+
cmake --build build --target test ARGS="-V --timeout 1700 -R 07_OFDFT"
156+
157+
- name: 08_EXX Test
158+
env:
159+
GTEST_COLOR: 'yes'
160+
OMP_NUM_THREADS: '2'
161+
run: |
162+
cmake --build build --target test ARGS="-V --timeout 1700 -R 08_EXX"
163+
164+
- name: 09_DeePKS Test
165+
env:
166+
GTEST_COLOR: 'yes'
167+
OMP_NUM_THREADS: '2'
168+
run: |
169+
cmake --build build --target test ARGS="-V --timeout 1700 -R 09_DeePKS"
170+
171+
- name: 10_others Test
172+
env:
173+
GTEST_COLOR: 'yes'
174+
OMP_NUM_THREADS: '2'
175+
run: |
176+
cmake --build build --target test ARGS="-V --timeout 1700 -R 10_others"
177+
178+
- name: Other Unittests
52179
env:
53180
GTEST_COLOR: 'yes'
54181
OMP_NUM_THREADS: '2'
55182
run: |
56-
cmake --build build --target test ARGS="-V --timeout 1700"
183+
cmake --build build --target test ARGS="-V --timeout 1700 -E 'integrate_test|01_PW|02_NAO_Gamma|03_NAO_multik|04_LJ_DP|05_rtTDDFT|06_SDFT|07_OFDFT|08_EXX|09_DeePKS|10_others|11_PW_GPU|12_NAO_Gamma_GPU|13_NAO_multik_GPU|15_rtTDDFT_GPU|16_SDFT_GPU|MODULE_BASE|MODULE_IO|MODULE_HSOLVER|MODULE_CELL|MODULE_MD|MODULE_PSI|MODULE_RI'"

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ STRU_READIN_ADJUST.cif
1717
build
1818
dist
1919
.idea
20-
toolchain.tar.gz
2120
time.json
2221
*.pyc
2322
__pycache__
2423
abacus.json
25-
*.npy
24+
*.npy
25+
toolchain/install/
26+
toolchain/abacus_env.sh

CMakeLists.txt

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,43 @@ project(
1010
HOMEPAGE_URL "https://github.com/deepmodeling/abacus-develop"
1111
LANGUAGES CXX)
1212

13-
option(ENABLE_LCAO "Enable LCAO calculation." ON)
14-
option(ENABLE_DEEPKS "Enable DeePKS functionality" OFF)
15-
option(ENABLE_MLKEDF "Enable Machine Learning based KEDF for OFDFT" OFF)
16-
option(ENABLE_LIBXC "Enable LibXC functionality" OFF)
17-
option(USE_CUDA "Enable support to CUDA for ABACUS." OFF)
18-
option(ENABLE_FLOAT_FFTW "Enable support to single precision FFTW library." OFF)
19-
option(USE_ROCM "Enable support to ROCm." OFF)
20-
option(USE_OPENMP "Enable OpenMP in ABACUS." ON)
13+
option(ENABLE_MPI "Enable MPI" ON)
14+
option(USE_OPENMP "Enable OpenMP" ON)
15+
option(USE_CUDA "Enable CUDA" OFF)
16+
option(USE_CUDA_MPI "Enable CUDA-aware MPI" OFF)
17+
option(USE_CUDA_ON_DCU "Enable CUDA on DCU" OFF)
18+
option(USE_ROCM "Enable ROCm" OFF)
19+
option(USE_DSP "Enable DSP" OFF)
20+
21+
option(USE_ABACUS_LIBM "Build libmath from source to speed up" OFF)
22+
option(ENABLE_LIBXC "Enable using the LibXC package" OFF)
23+
option(ENABLE_FLOAT_FFTW "Enable using single-precision FFTW library." OFF)
24+
option(ENABLE_DEEPKS "Enable the DeePKS algorithm" OFF)
25+
option(ENABLE_MLKEDF "Enable the Machine-Learning-based KEDF for OFDFT" OFF)
26+
27+
option(ENABLE_LCAO "Enable LCAO algorithm" ON)
28+
option(USE_ELPA "Enable ELPA for LCAO" ON)
29+
option(ENABLE_LIBRI "Enable LibRI for hybrid functional" OFF)
30+
option(ENABLE_LIBCOMM "Enable LibComm" OFF)
31+
option(ENABLE_PEXSI "Enable PEXSI for LCAO" OFF)
32+
33+
option(BUILD_TESTING "Build unittests" OFF)
34+
option(DEBUG_INFO "Print message to debug" OFF)
2135
option(ENABLE_ASAN "Enable AddressSanitizer" OFF)
22-
option(BUILD_TESTING "Build ABACUS unit tests" OFF)
23-
option(INFO "Enable gathering of math library information" OFF)
24-
option(ENABLE_COVERAGE "Enable coverage build." OFF)
25-
option(ENABLE_LIBRI "Enable EXX with LibRI." OFF)
26-
option(ENABLE_LIBCOMM "Enable communicate with LibComm." OFF)
27-
option(ENABLE_PAW "Enable PAW calculation" OFF)
28-
option(ENABLE_MPI "Enable compilation with or without MPI." ON)
29-
option(USE_ELPA "Enable ELPA" ON)
30-
option(USE_ABACUS_LIBM "Build libmath from source to speed up." OFF)
36+
option(INFO "Enable gathering math library information" OFF)
37+
option(ENABLE_COVERAGE "Enable coverage build" OFF)
3138
option(GIT_SUBMODULE "Check submodules during build" ON)
32-
option(DEBUG_INFO "Print message for developers to debug." OFF)
39+
3340
# Do not enable it if generated code will run on different CPUs
3441
option(ENABLE_NATIVE_OPTIMIZATION
3542
"Enable compilation optimization for the native machine's CPU type" OFF)
43+
3644
option(COMMIT_INFO "Print commit information in log" ON)
37-
option(ENABLE_FFT_TWO_CENTER "Enable FFT-based two-center integral method." ON)
38-
option(ENABLE_GOOGLEBENCH "Enable GOOGLE-benchmark usage." OFF)
39-
option(ENABLE_RAPIDJSON "Enable rapid-json usage." OFF)
40-
option(ENABLE_CNPY "Enable cnpy usage." OFF)
41-
option(ENABLE_PEXSI "Enable support for PEXSI." OFF)
42-
option(ENABLE_CUSOLVERMP "Enable cusolvermp." OFF)
43-
option(USE_DSP "Enable DSP usage." OFF)
44-
option(USE_CUDA_ON_DCU "Enable CUDA on DCU" OFF)
45-
option(USE_CUDA_MPI "Enable CUDA-aware MPI" OFF)
45+
option(ENABLE_FFT_TWO_CENTER "Enable FFT-based two-center integral method" ON)
46+
option(ENABLE_GOOGLEBENCH "Enable GOOGLE-benchmark usage" OFF)
47+
option(ENABLE_RAPIDJSON "Enable rapid-json usage" OFF)
48+
option(ENABLE_CNPY "Enable cnpy usage" OFF)
49+
option(ENABLE_CUSOLVERMP "Enable cusolvermp" OFF)
4650

4751
# enable json support
4852
if(ENABLE_RAPIDJSON)
@@ -108,11 +112,13 @@ You can install Git first and reinstall abacus.")
108112
endif()
109113
endif()
110114

115+
# Serial version of ABACUS will not use ELPA
111116
if(NOT ENABLE_MPI)
112117
set(USE_ELPA OFF)
113118
set(ENABLE_DEEPKS OFF)
114119
endif()
115120

121+
# Different exe files of ABACUS
116122
if(ENABLE_LCAO AND ENABLE_MPI)
117123
set(ABACUS_BIN_NAME abacus)
118124
elseif(NOT ENABLE_LCAO AND ENABLE_MPI)
@@ -123,6 +129,7 @@ elseif(ENABLE_LCAO AND NOT ENABLE_MPI)
123129
set(ABACUS_BIN_NAME abacus_serial)
124130
endif()
125131

132+
# Use DSP hardware
126133
if (USE_DSP)
127134
set(USE_ELPA OFF)
128135
set(ENABLE_LCAO OFF)
@@ -181,6 +188,7 @@ find_program(CCACHE ccache)
181188
if(CCACHE)
182189
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE} ${CMAKE_CXX_COMPILER_LAUNCHER})
183190
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE} ${CMAKE_C_COMPILER_LAUNCHER})
191+
set(CMAKE_CUDA_COMPILER_LAUNCHER ${CCACHE} ${CMAKE_CUDA_COMPILER_LAUNCHER})
184192
endif()
185193

186194
# Choose build type from: Debug Release RelWithDebInfo MinSizeRel Select
@@ -206,7 +214,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
206214
add_compile_options(-fp-model=strict)
207215
set(USE_ABACUS_LIBM OFF) # Force turn off USE_ABACUS_LIBM on Intel Compiler
208216
set(CMAKE_CXX_FLAGS
209-
"${CMAKE_CXX_FLAGS} -Wno-write-strings -Wno-tautological-constant-compare"
217+
"${CMAKE_CXX_FLAGS} -Wno-write-strings "
210218
)
211219
endif()
212220

@@ -261,6 +269,7 @@ if(ENABLE_MPI)
261269
list(APPEND math_libs MPI::MPI_CXX)
262270
endif()
263271

272+
264273
if (USE_DSP)
265274
add_compile_definitions(__DSP)
266275
target_link_libraries(${ABACUS_BIN_NAME} ${OMPI_LIBRARY1})
@@ -352,9 +361,19 @@ if(USE_CUDA)
352361
endif()
353362
if (ENABLE_CUSOLVERMP)
354363
add_compile_definitions(__CUSOLVERMP)
364+
find_library(CAL_LIBRARY
365+
NAMES cal
366+
PATHS ${CAL_CUSOLVERMP_PATH}
367+
NO_DEFAULT_PATH
368+
)
369+
find_library(CUSOLVERMP_LIBRARY
370+
NAMES cusolverMp
371+
PATHS ${CAL_CUSOLVERMP_PATH}
372+
NO_DEFAULT_PATH
373+
)
355374
target_link_libraries(${ABACUS_BIN_NAME}
356-
cal
357-
cusolverMp
375+
${CAL_LIBRARY}
376+
${CUSOLVERMP_LIBRARY}
358377
)
359378
endif()
360379
endif()
@@ -591,18 +610,7 @@ if(ENABLE_LIBCOMM)
591610
include_directories(${LIBCOMM_DIR}/include)
592611
endif()
593612

594-
if(ENABLE_PAW)
595-
if(LIBPAW_DIR)
596-
add_subdirectory(${LIBPAW_DIR})
597-
elseif(GIT_SUBMODULE)
598-
git_submodule_update()
599-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deps/libpaw_interface)
600-
else()
601-
message(FATAL_ERROR "Must provide LIBPAW_DIR for PAW related features.")
602-
endif()
603-
target_link_libraries(${ABACUS_BIN_NAME} paw)
604-
add_compile_definitions(USE_PAW)
605-
endif()
613+
606614

607615
list(APPEND math_libs m)
608616
target_link_libraries(${ABACUS_BIN_NAME} ${math_libs})
@@ -778,4 +786,4 @@ install(PROGRAMS ${ABACUS_BIN_PATH}
778786

779787
if(ENABLE_COVERAGE)
780788
coverage_evaluate()
781-
endif()
789+
endif()

Dockerfile.intel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ RUN source /opt/intel/oneapi/setvars.sh && \
4444
ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \
4545
cd /tmp && rm -rf elpa-$ELPA_VER
4646

47+
RUN cd /tmp && git clone https://github.com/Tencent/rapidjson.git && cp -r rapidjson/include/rapidjson /usr/include/ \
48+
&& rm -rf rapidjson
49+
4750
RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip \
4851
--no-check-certificate --quiet -O libtorch.zip && \
4952
unzip -q libtorch.zip -d /opt && rm libtorch.zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# About ABACUS
1414

15-
ABACUS (Atomic-orbital Based Ab-initio Computation at UStc) is an open-source package based on density functional theory (DFT). The package utilizes both plane wave and numerical atomic basis sets with the usage of norm-conserving pseudopotentials to describe the interactions between nuclear ions and valence electrons. ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from single-point calculations, the package allows geometry optimizations and ab-initio molecular dynamics with various ensembles. The package also provides a variety of advanced functionalities for simulating materials, including the DFT+U, VdW corrections, and implicit solvation model, etc. In addition, ABACUS strives to provide a general infrastructure to facilitate the developments and applications of novel machine-learning-assisted DFT methods (DeePKS, DP-GEN, DeepH, DeePTB etc.) in molecular and material simulations.
15+
ABACUS (**A**tomic-orbital **B**ased **A**b-initio **C**omputation at **US**tc) is an open-source package based on density functional theory (DFT). The package utilizes both plane wave and numerical atomic basis sets with the usage of pseudopotentials to describe the interactions between nuclear ions and valence electrons. ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from single-point calculations, the package allows geometry optimizations and ab-initio molecular dynamics with various ensembles. The package also provides a variety of advanced functionalities for simulating materials, including the DFT+U, VdW corrections, and implicit solvation model, etc. In addition, ABACUS strives to provide a general infrastructure to facilitate the developments and applications of novel machine-learning-assisted DFT methods (DeePKS, DP-GEN, DeepH, DeePTB etc.) in molecular and material simulations.
1616

1717
# Online Documentation
1818
For detailed documentation, please refer to [our documentation website](https://abacus.deepmodeling.com/).

0 commit comments

Comments
 (0)