Skip to content

Commit dfee167

Browse files
authored
Tear down the integration tests into more than 10 subdirectories (#6186)
* move rt-TDDFT tests into a separate directory * reorganize the integrate tests * update integrate tests * update 04_EXX tests * update tests in 03_nao_multik * update tests * update PW data * update tests * reduce computational time * update PW examples * update some PW examples * update test example * add CASES_CPU.txt and CMakeLists.txt in 01_PW * update 02_NAO_Gamma examples * update 02_NAO_Gamma CASES and CMake * update 03_NAO_multik examples * update integrate tests 03_NAO_multik * update integrate tests 04_LJ_DP * update integrate tests of 05_rtTDDFT * update 06_SDFT integrate tests * add integrate tests 07_OFDFT * add integrate tests 08_EXX * update 09_DeePKS integrate tests * add 10_others integrate tests * update GPU tests and yml file * add two CMakeLists.txt * add testing cases in 11_PW_GPU * update test.yml * update test.yml * update CMakeLists.txt for various integrate tests * update test.yml * update pw examples, exclude one which seems to have bugs * update directory 01_PW * update 01_PW and 04 * update fix a bug * update abacus command for GPU * update GPU examples
1 parent e2d4606 commit dfee167

File tree

2,214 files changed

+1025
-5925
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,214 files changed

+1025
-5925
lines changed

.github/workflows/cuda.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ 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 16_SDFT_GPU
46+
run: |
47+
cd tests/16_SDFT_GPU
48+
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt

.github/workflows/test.yml

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,88 @@ jobs:
4848
run: |
4949
cmake --build build -j8
5050
cmake --install build
51-
- name: Unit Test
51+
52+
- name: Integrated Test
5253
env:
5354
GTEST_COLOR: 'yes'
5455
OMP_NUM_THREADS: '2'
5556
run: |
56-
cmake --build build --target test ARGS="-V --timeout 1700 -E integrated_test"
57-
- name: Integrated Test
57+
cmake --build build --target test ARGS="-V --timeout 1700 -R integrated_test"
58+
59+
- name: 01_PW Test
5860
env:
5961
GTEST_COLOR: 'yes'
6062
OMP_NUM_THREADS: '2'
6163
run: |
62-
cmake --build build --target test ARGS="-V --timeout 1700 -R integrated_test"
64+
cmake --build build --target test ARGS="-V --timeout 1700 -R 01_PW"
65+
66+
- name: 02_NAO_Gamma Test
67+
env:
68+
GTEST_COLOR: 'yes'
69+
OMP_NUM_THREADS: '2'
70+
run: |
71+
cmake --build build --target test ARGS="-V --timeout 1700 -R 02_NAO_Gamma"
72+
73+
- name: 03_NAO_multik Test
74+
env:
75+
GTEST_COLOR: 'yes'
76+
OMP_NUM_THREADS: '2'
77+
run: |
78+
cmake --build build --target test ARGS="-V --timeout 1700 -R 03_NAO_multik"
79+
80+
- name: 04_LJ_DP Test
81+
env:
82+
GTEST_COLOR: 'yes'
83+
OMP_NUM_THREADS: '2'
84+
run: |
85+
cmake --build build --target test ARGS="-V --timeout 1700 -R 04_LJ_DP"
86+
87+
- name: 05_rtTDDFT Test
88+
env:
89+
GTEST_COLOR: 'yes'
90+
OMP_NUM_THREADS: '2'
91+
run: |
92+
cmake --build build --target test ARGS="-V --timeout 1700 -R 05_rtTDDFT"
93+
94+
- name: 06_SDFT Test
95+
env:
96+
GTEST_COLOR: 'yes'
97+
OMP_NUM_THREADS: '2'
98+
run: |
99+
cmake --build build --target test ARGS="-V --timeout 1700 -R 06_SDFT"
100+
101+
- name: 07_OFDFT Test
102+
env:
103+
GTEST_COLOR: 'yes'
104+
OMP_NUM_THREADS: '2'
105+
run: |
106+
cmake --build build --target test ARGS="-V --timeout 1700 -R 07_OFDFT"
107+
108+
- name: 08_EXX 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 08_EXX"
114+
115+
- name: 09_DeePKS 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 09_DeePKS"
121+
122+
- name: 10_others 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 10_others"
128+
129+
- name: Unit Test
130+
env:
131+
GTEST_COLOR: 'yes'
132+
OMP_NUM_THREADS: '2'
133+
run: |
134+
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'"
63135

source/module_lr/lr_spectrum.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,15 @@ void LR::LR_Spectrum<T>::optical_absorption_method1(const std::vector<double>& f
195195
// = -4*pi/V * oscilator_strength * Im[1/[(w+i\eta)^2-\Omega_S^2]]
196196
std::vector<double>& osc = this->oscillator_strength_;
197197
std::ofstream ofs(PARAM.globalv.global_out_dir + "absorption.dat");
198-
if (GlobalV::MY_RANK == 0) { ofs << "Frequency (eV) | wave length(nm) | Absorption (a.u.)" << std::endl; }
198+
199+
if (GlobalV::MY_RANK == 0)
200+
{
201+
ofs << "Frequency (eV) | wave length(nm) | Absorption (a.u.)" << std::endl;
202+
}
203+
199204
double FourPI_div_c = ModuleBase::FOUR_PI / 137.036;
200205
double fac = 4 * M_PI / ucell.omega * ModuleBase::e2 / this->nk; // e2 for Ry to Hartree in the denominator
206+
201207
for (int f = 0;f < freq.size();++f)
202208
{
203209
std::complex<double> f_complex = std::complex<double>(freq[f], eta);
@@ -297,4 +303,4 @@ void LR::LR_Spectrum<T>::write_transition_dipole(const std::string& filename)
297303
}
298304

299305
template class LR::LR_Spectrum<double>;
300-
template class LR::LR_Spectrum<std::complex<double>>;
306+
template class LR::LR_Spectrum<std::complex<double>>;

tests/integrate/101_PW_15_LDA/INPUT renamed to tests/01_PW/001_PW_15_ONCV/INPUT

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ smearing_sigma 0.002
2424
mixing_type broyden
2525
mixing_beta 0.7
2626

27-
dft_functional pz
27+
out_ldos 1
28+
stm_bias 2
File renamed without changes.
File renamed without changes.

tests/01_PW/001_PW_15_ONCV/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1. SG15 ONCV pseudopotential
2+
2. symmetry=on
3+
3. test LDOS with 2 eV, output LDOS_2eV.cube
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)