Skip to content

Commit d31b721

Browse files
authored
Merge branch 'develop' into develop
2 parents 4ed64fe + 6c559be commit d31b721

File tree

61 files changed

+368
-187
lines changed

Some content is hidden

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

61 files changed

+368
-187
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,27 @@ jobs:
8383
OMP_NUM_THREADS: '2'
8484
run: |
8585
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"
86107
87108
- name: 01_PW Test
88109
env:
@@ -159,4 +180,4 @@ jobs:
159180
GTEST_COLOR: 'yes'
160181
OMP_NUM_THREADS: '2'
161182
run: |
162-
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'"
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'"

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ if(ENABLE_MPI)
269269
list(APPEND math_libs MPI::MPI_CXX)
270270
endif()
271271

272+
272273
if (USE_DSP)
273274
add_compile_definitions(__DSP)
274275
target_link_libraries(${ABACUS_BIN_NAME} ${OMPI_LIBRARY1})

docs/advanced/input_files/input-main.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,21 +1644,22 @@ These variables are used to control the output of properties.
16441644

16451645
- **Type**: Boolean
16461646
- **Availability**: Numerical atomic orbital basis
1647-
- **Description**: Whether to output the density matrix of localized orbitals into files in the folder `OUT.${suffix}`. The files are named as:
1647+
- **Description**: Whether to output the density matrix for each k-point into files in the folder `OUT.${suffix}`. The files are named as:
16481648
- For gamma only case:
1649-
- nspin = 1: SPIN1_DM;
1650-
- nspin = 2: SPIN1_DM, and SPIN2_DM.
1649+
- nspin = 1: `dms1_nao.csr`;
1650+
- nspin = 2: `dms1_nao.csr` and `dms2_nao.csr` for the two spin channels.
16511651
- For multi-k points case:
1652-
- SPIN\*_K\*_DM, where \* stands for index of spin and kpoints;
1652+
- nspin = 1: `dms1k1_nao.csr`, `dms1k2_nao.csr`, ...;
1653+
- nspin = 2: `dms1k1_nao.csr`... and `dms2k1_nao.csr`... for the two spin channels.
16531654
- **Default**: False
16541655

16551656
### out_dm1
16561657

16571658
- **Type**: Boolean
16581659
- **Availability**: Numerical atomic orbital basis (multi-k points)
1659-
- **Description**: Whether to output the density matrix of localized orbitals into files in the folder `OUT.${suffix}`. The density matrices are written in the format of sparse matrices, as mentioned in [out_mat_hs2](#out_mat_hs2). The files are named as:
1660-
- nspin = 1: data-DMR-sparse_SPIN0.csr;
1661-
- nspin = 2: data-DMR-sparse_SPIN0.csr, and data-DMR-sparse_SPIN1.csr.
1660+
- **Description**: Whether to output the density matrix with Bravias lattice vector R, labelled as DM(R), into files in the folder `OUT.${suffix}`. The files are named as `dmr{s}{spin index}{g}{geometry index}{_nao} + {".csr"}`. Here, 's' refers to spin, where s1 means spin up channel while s2 means spin down channel, and the sparse matrix format 'csr' is mentioned in [out_mat_hs2](#out_mat_hs2). Finally, if [out_app_flag](#out_app_flag) is set to false, the file name contains the optinal 'g' index for each ionic step that may have different geometries, and if [out_app_flag](#out_app_flag) is set to true, the density matrix with respect to Bravias lattice vector R accumulates during ionic steps:
1661+
- nspin = 1: `dmrs1_nao.csr`;
1662+
- nspin = 2: `dmrs1_nao.csr` and `dmrs2_nao.csr` for the two spin channels.
16621663
- **Default**: False
16631664

16641665
### out_wfc_pw

source/module_base/grid/test/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET test_delley
4+
TARGET MODULE_BASE_GRID_test_delley
55
SOURCES test_delley.cpp
66
../delley.cpp
77
../../ylm.cpp
88
)
99

1010
AddTest(
11-
TARGET test_radial
11+
TARGET MODULE_BASE_GRID_test_radial
1212
SOURCES test_radial.cpp
1313
../radial.cpp
1414
)
1515

1616
AddTest(
17-
TARGET test_partition
17+
TARGET MODULE_BASE_GRID_test_partition
1818
SOURCES test_partition.cpp
1919
../partition.cpp
2020
../radial.cpp
2121
../delley.cpp
2222
)
2323

2424
AddTest(
25-
TARGET test_batch
25+
TARGET MODULE_BASE_GRID_test_batch
2626
SOURCES test_batch.cpp
2727
../batch.cpp
2828
LIBS ${math_libs}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET Base_Kernels_UTs
4+
TARGET MODULE_BASE_KERNELS_Unittests
55
LIBS parameter ${math_libs} base device
66
SOURCES math_ylm_op_test.cpp math_kernel_test.cpp
77
)

source/module_base/libm/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET Base_Libm_UTs
4+
TARGET MODULE_BASE_LIBM_UTs
55
SOURCES libm_test.cpp
66
../branred.cpp
77
../cexp.cpp

source/module_base/module_container/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET container_uts
4+
TARGET MODULE_BASE_CONTAINER_Unittests
55
LIBS parameter container base device ${math_libs}
66
SOURCES tensor_test.cpp tensor_shape_test.cpp allocator_test.cpp
77
tensor_buffer_test.cpp tensor_map_test.cpp
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AddTest(
2-
TARGET Module_Device_UTs
2+
TARGET MODULE_BASE_DEVICE_Unittests
33
LIBS parameter ${math_libs} base device
44
SOURCES memory_test.cpp device_test.cpp
55
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
remove_definitions(-D__MPI)
22
AddTest(
3-
TARGET test_mixing
3+
TARGET MODULE_BASE_MIXING_unittests
44
LIBS parameter base device ${math_libs}
55
SOURCES mixing_test.cpp
66
)

source/module_basis/module_pw/module_fft/fft_base.h

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class FFT_BASE
1212
virtual ~FFT_BASE() {};
1313

1414
/**
15-
* @brief Initialize the fft parameters As virtual function.
15+
* @brief Initialize the fft parameters as virtual function.
1616
*
1717
* The function is used to initialize the fft parameters.
1818
*/
@@ -30,32 +30,40 @@ class FFT_BASE
3030
virtual __attribute__((weak)) void initfft(int nx_in, int ny_in, int nz_in);
3131

3232
/**
33-
* @brief Setup the fft Plan and data As pure virtual function.
33+
* @brief Setup the fft plan and data as pure virtual function.
3434
*
3535
* The function is set as pure virtual function.In order to
3636
* override the function in the derived class.In the derived
37-
* class, the function is used to setup the fft Plan and data.
37+
* class, the function is used to setup the fft plan and data.
3838
*/
3939
virtual void setupFFT() = 0;
4040

4141
/**
42-
* @brief Clean the fft Plan As pure virtual function.
42+
* @brief Clean the fft plan as pure virtual function.
4343
*
4444
* The function is set as pure virtual function.In order to
4545
* override the function in the derived class.In the derived
46-
* class, the function is used to clean the fft Plan.
46+
* class, the function is used to clean the fft plan.
4747
*/
4848
virtual void cleanFFT() = 0;
4949

5050
/**
51-
* @brief Clear the fft data As pure virtual function.
51+
* @brief Clear the fft data as pure virtual function.
5252
*
5353
* The function is set as pure virtual function.In order to
5454
* override the function in the derived class.In the derived
5555
* class, the function is used to clear the fft data.
5656
*/
5757
virtual void clear() = 0;
58-
58+
/**
59+
* @brief Allocate and destory the resoure in FFT running time,
60+
* Now it only used in the DSP mode.
61+
*
62+
* The function is set as pure virtual function.In order to
63+
* override the function in the derived class.In the derived
64+
* class, the function is used to allocate and destory the
65+
* resoure in FFT running time.
66+
*/
5967
virtual void resource_handler(const int flag) const {};
6068
/**
6169
* @brief Get the real space data in cpu-like fft

0 commit comments

Comments
 (0)