Skip to content

Commit cecf38c

Browse files
authored
Merge branch 'develop' into LC_Exx-new
2 parents 7f30a56 + dcbeb06 commit cecf38c

File tree

89 files changed

+1463
-576
lines changed

Some content is hidden

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

89 files changed

+1463
-576
lines changed

.github/workflows/test.yml

Lines changed: 24 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_PAW=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.
@@ -132,10 +132,31 @@ jobs:
132132
OMP_NUM_THREADS: '2'
133133
run: |
134134
cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_BASE"
135+
136+
- name: Module IO Unit 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 MODULE_IO"
142+
143+
- name: Module HSolver Unit 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 MODULE_HSOLVER"
149+
150+
- name: Module Cell Unit 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 MODULE_CELL"
135156
136-
- name: Unit Test
157+
- name: Other Unit Tests
137158
env:
138159
GTEST_COLOR: 'yes'
139160
OMP_NUM_THREADS: '2'
140161
run: |
141-
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|16_SDFT_GPU'"
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'"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ __pycache__
2323
abacus.json
2424
*.npy
2525
toolchain/install/
26-
toolchain/abacus_env.sh
26+
toolchain/abacus_env.sh

docs/advanced/elec_properties/wfc.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ In the LCAO basis case, several `WFC_NAO_K${k}.dat` files will be output in mult
99

1010
## wave function in real space
1111

12-
One can also choose to output real-space wave function in PW basis calculation with the key word ***[out_wfc_r](https://abacus-rtd.readthedocs.io/en/latest/advanced/input_files/input-main.html#out_wfc_r)***.
13-
14-
After calculation, an additional directory named `wfc_realspace` will appear in the `OUT.${system}` directory.
12+
One can also choose to output real-space wave function in PW basis calculation with the key word ***[out_wfc_norm](https://abacus-rtd.readthedocs.io/en/latest/advanced/input_files/input-main.html#out-wfc-norm)***.
1513

1614
Notice: when the ***[basis_type](https://abacus-rtd.readthedocs.io/en/latest/advanced/input_files/input-main.html#basis_type)*** is `lcao`, only `get_wf` ***[calculation](https://abacus-rtd.readthedocs.io/en/latest/advanced/input_files/input-main.html#calculation)*** is effective. An example is [examples/wfc/lcao_ienvelope_Si2](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/wfc/lcao_ienvelope_Si2).

docs/advanced/input_files/input-main.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
- [out\_dm](#out_dm)
137137
- [out\_dm1](#out_dm1)
138138
- [out\_wfc\_pw](#out_wfc_pw)
139-
- [out\_wfc\_r](#out_wfc_r)
140139
- [out\_wfc\_lcao](#out_wfc_lcao)
141140
- [out\_dos](#out_dos)
142141
- [out\_ldos](#out_ldos)
@@ -1599,7 +1598,7 @@ These variables are used to control the output of properties.
15991598
### out_freq_elec
16001599

16011600
- **Type**: Integer
1602-
- **Description**: Output the charge density (only binary format, controlled by [out_chg](#out_chg)), wavefunction (controlled by [out_wfc_pw](#out_wfc_pw) or [out_wfc_r](#out_wfc_r)) per `out_freq_elec` electronic iterations. Note that they are always output when converged or reach the maximum iterations [scf_nmax](#scf_nmax).
1601+
- **Description**: Output the charge density (only binary format, controlled by [out_chg](#out_chg)), wavefunction (controlled by [out_wfc_pw](#out_wfc_pw)) per `out_freq_elec` electronic iterations. Note that they are always output when converged or reach the maximum iterations [scf_nmax](#scf_nmax).
16031602
- **Default**: [scf_nmax](#scf_nmax)
16041603

16051604
### out_chg
@@ -1676,13 +1675,6 @@ These variables are used to control the output of properties.
16761675
- 2: results are stored in binary files named `OUT.${suffix}/WAVEFUNC${K}.dat`.
16771676
- **Default**: 0
16781677

1679-
### out_wfc_r
1680-
1681-
- **Type**: Boolean
1682-
- **Availability**: Plane wave basis or get_wf calculation in numerical atomic orbital basis
1683-
- **Description**: Whether to output real-space wave functions into `OUT.suffix/wfc_realspace/wfc_realspace_${K}_${B}`, where `${K}` is the index of k points, `${B}` is the index of bands.
1684-
- **Default**: False
1685-
16861678
### out_wfc_lcao
16871679

16881680
- **Type**: Integer
@@ -1917,14 +1909,14 @@ The band (KS orbital) energy for each (k-point, spin, band) will be printed in t
19171909
### out_wfc_norm
19181910

19191911
- **Type**: String
1920-
- **Availability**: For LCAO, used when `calculation = get_wf`.
1912+
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_wf`.
19211913
- **Description**: Specifies the bands to calculate the real-space wave function modulus (norm, or known as the envelope function) $|\psi(r)|$. The syntax and band selection rules are identical to [`out_pchg`](#out_pchg), but the output is the norm of the wave function.
19221914
- **Default**: none
19231915

19241916
### out_wfc_re_im
19251917

19261918
- **Type**: String
1927-
- **Availability**: For LCAO, used when `calculation = get_wf`.
1919+
- **Availability**: For both PW and LCAO. When `basis_type = lcao`, used when `calculation = get_wf`.
19281920
- **Description**: Specifies the bands to calculate the real and imaginary parts of the wave function $\text{Re}(\psi(r))$ and $\text{Im}(\psi(r))$. The syntax and band selection rules are identical to [`out_pchg`](#out_pchg), but the output contains both the real and imaginary components of the wave function.
19291921
- **Default**: none
19301922

source/module_base/test/math_chebyshev_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
* - calfinalvec_real
1515
* - calfinalvec_complex
1616
* - tracepolyA
17-
* - checkconverge
18-
*
19-
*
2017
*/
2118
class toolfunc
2219
{
@@ -625,6 +622,8 @@ TEST_F(MathChebyshevTest, tracepolyA_float)
625622

626623
TEST_F(MathChebyshevTest, checkconverge_float)
627624
{
625+
#ifdef __MPI
626+
#undef __MPI
628627
const int norder = 100;
629628
p_fchetest = new ModuleBase::Chebyshev<float>(norder);
630629

@@ -648,5 +647,6 @@ TEST_F(MathChebyshevTest, checkconverge_float)
648647

649648
delete[] v;
650649
delete p_fchetest;
650+
#endif
651651
}
652652
#endif

source/module_base/test_parallel/CMakeLists.txt

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
AddTest(
2-
TARGET base_ParaCommon
2+
TARGET MODULE_BASE_ParaCommon
33
LIBS parameter MPI::MPI_CXX
44
SOURCES parallel_common_test.cpp ../global_variable.cpp ../parallel_common.cpp
55
)
66

77
AddTest(
8-
TARGET base_ParaGlobal
8+
TARGET MODULE_BASE_ParaGlobal
99
LIBS parameter MPI::MPI_CXX
1010
SOURCES parallel_global_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp
1111
)
1212

1313
AddTest(
14-
TARGET base_ParaReduce
14+
TARGET MODULE_BASE_ParaReduce
1515
LIBS parameter MPI::MPI_CXX
1616
SOURCES parallel_reduce_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp ../parallel_common.cpp ../parallel_reduce.cpp
1717
)
@@ -21,39 +21,45 @@ install(FILES parallel_global_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
2121
install(FILES parallel_reduce_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
2222

2323
find_program(BASH bash)
24-
add_test(NAME base_parallel_common_test
24+
add_test(NAME MODULE_BASE_parallel_common_test
2525
COMMAND ${BASH} parallel_common_test.sh
2626
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
2727
)
28-
add_test(NAME base_parallel_global_test
28+
add_test(NAME MODULE_BASE_parallel_global_test
2929
COMMAND ${BASH} parallel_global_test.sh
3030
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
3131
)
32-
add_test(NAME base_parallel_reduce_test
32+
add_test(NAME MODULE_BASE_parallel_reduce_test
3333
COMMAND ${BASH} parallel_reduce_test.sh
3434
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
3535
)
3636

3737
AddTest(
38-
TARGET base_para_gemm
38+
TARGET MODULE_BASE_para_gemm
3939
LIBS MPI::MPI_CXX ${math_libs} base device parameter
4040
SOURCES test_para_gemm.cpp
4141
)
4242

43-
add_test(NAME base_para_gemm_parallel
44-
COMMAND mpirun -np 4 ./base_para_gemm
43+
AddTest(
44+
TARGET MODULE_BASE_math_chebyshev_mpi
45+
LIBS MPI::MPI_CXX parameter ${math_libs} base device container
46+
SOURCES math_chebyshev_mpi_test.cpp
47+
)
48+
49+
add_test(NAME MODULE_BASE_para_gemm_parallel
50+
COMMAND mpirun -np 4 ./MODULE_BASE_para_gemm
4551
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
4652
)
4753

4854
AddTest(
49-
TARGET parallel_2d_test
55+
TARGET MODULE_BASE_parallel_2d_test
5056
SOURCES parallel_2d_test.cpp ../parallel_2d.cpp
5157
LIBS parameter ${math_libs}
5258
)
5359

5460
install(FILES parallel_2d_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
5561
find_program(BASH bash)
56-
add_test(NAME parallel_2d_test_para
62+
add_test(NAME MODULE_BASE_parallel_2d_test_para
5763
COMMAND ${BASH} parallel_2d_test.sh
5864
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
5965
)
@@ -67,12 +73,12 @@ add_test(NAME parallel_2d_test_para
6773
endif()
6874

6975
AddTest(
70-
TARGET blacs_connector
76+
TARGET MODULE_BASE_blacs_connector
7177
LIBS parameter MPI::MPI_CXX ${BLACS_LIB}
7278
SOURCES blacs_connector_test.cpp
7379
)
7480
install(FILES blacs_connector_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
75-
add_test(NAME blacs_connector_test
81+
add_test(NAME MODULE_BASE_blacs_connector_test
7682
COMMAND ${BASH} blacs_connector_test.sh
7783
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
7884
)

source/module_base/test_parallel/blacs_connector_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ do
99
continue
1010
fi
1111
echo "TEST in parallel, nprocs=$i"
12-
mpirun -np $i ./blacs_connector
12+
mpirun -np $i ./MODULE_BASE_blacs_connector
1313
if [[ $? -ne 0 ]]; then
1414
echo -e "\e[1;33m [ FAILED ] \e[0m"\
1515
"execute UT with $i cores error."

0 commit comments

Comments
 (0)