Skip to content

Tear down the integration tests into more than 10 subdirectories #6186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d75e872
move rt-TDDFT tests into a separate directory
mohanchen May 3, 2025
c0c8877
reorganize the integrate tests
mohanchen May 3, 2025
3fdf7bf
update integrate tests
mohanchen May 3, 2025
9fce919
update 04_EXX tests
mohanchen May 3, 2025
94ec73b
update tests in 03_nao_multik
mohanchen May 3, 2025
563d47e
update tests
mohanchen May 3, 2025
08d4e63
update PW data
mohanchen May 3, 2025
11b477d
update tests
mohanchen May 3, 2025
00a3704
reduce computational time
mohanchen May 3, 2025
8fba5ad
update PW examples
mohanchen May 3, 2025
bcb317c
update some PW examples
mohanchen May 3, 2025
536f00c
update test example
mohanchen May 3, 2025
425f303
add CASES_CPU.txt and CMakeLists.txt in 01_PW
mohanchen May 3, 2025
cd882ff
update 02_NAO_Gamma examples
mohanchen May 3, 2025
960d065
update 02_NAO_Gamma CASES and CMake
mohanchen May 3, 2025
5380f61
update 03_NAO_multik examples
mohanchen May 3, 2025
27f6d7b
update integrate tests 03_NAO_multik
mohanchen May 3, 2025
63991ac
update integrate tests 04_LJ_DP
mohanchen May 3, 2025
9539e56
update integrate tests of 05_rtTDDFT
mohanchen May 3, 2025
5738338
update 06_SDFT integrate tests
mohanchen May 3, 2025
5f1230c
add integrate tests 07_OFDFT
mohanchen May 3, 2025
f165a81
add integrate tests 08_EXX
mohanchen May 3, 2025
6dc4ffb
update 09_DeePKS integrate tests
mohanchen May 3, 2025
467b1c0
add 10_others integrate tests
mohanchen May 3, 2025
d9d9471
update GPU tests and yml file
mohanchen May 3, 2025
3a6053e
add two CMakeLists.txt
mohanchen May 3, 2025
c607f14
add testing cases in 11_PW_GPU
mohanchen May 3, 2025
a226aaa
update test.yml
mohanchen May 3, 2025
4efd927
update test.yml
mohanchen May 3, 2025
4d4c47e
update CMakeLists.txt for various integrate tests
mohanchen May 3, 2025
3452c9f
update test.yml
mohanchen May 3, 2025
7e7a108
update pw examples, exclude one which seems to have bugs
mohanchen May 3, 2025
12b2851
update directory 01_PW
mohanchen May 3, 2025
e93c373
update 01_PW and 04
mohanchen May 3, 2025
a88f433
update fix a bug
mohanchen May 3, 2025
cc35a0d
update abacus command for GPU
mohanchen May 3, 2025
e35291f
update GPU examples
mohanchen May 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 8 additions & 3 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ jobs:
cmake --build build -j4
cmake --install build

- name: Test
- name: Test 11_PW_GPU
run: |
cd tests/integrate
bash Autotest.sh -n 2 -f CASES_GPU.txt
cd tests/11_PW_GPU
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt

- name: Test 16_SDFT_GPU
run: |
cd tests/16_SDFT_GPU
bash ../integrate/Autotest.sh -n 2 -f CASES_GPU.txt
80 changes: 76 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,88 @@ jobs:
run: |
cmake --build build -j8
cmake --install build
- name: Unit Test

- name: Integrated Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -E integrated_test"
- name: Integrated Test
cmake --build build --target test ARGS="-V --timeout 1700 -R integrated_test"

- name: 01_PW Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R integrated_test"
cmake --build build --target test ARGS="-V --timeout 1700 -R 01_PW"

- name: 02_NAO_Gamma Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 02_NAO_Gamma"

- name: 03_NAO_multik Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 03_NAO_multik"

- name: 04_LJ_DP Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 04_LJ_DP"

- name: 05_rtTDDFT Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 05_rtTDDFT"

- name: 06_SDFT Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 06_SDFT"

- name: 07_OFDFT Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 07_OFDFT"

- name: 08_EXX Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 08_EXX"

- name: 09_DeePKS Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 09_DeePKS"

- name: 10_others Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
cmake --build build --target test ARGS="-V --timeout 1700 -R 10_others"

- name: Unit Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
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'"

10 changes: 8 additions & 2 deletions source/module_lr/lr_spectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,15 @@ void LR::LR_Spectrum<T>::optical_absorption_method1(const std::vector<double>& f
// = -4*pi/V * oscilator_strength * Im[1/[(w+i\eta)^2-\Omega_S^2]]
std::vector<double>& osc = this->oscillator_strength_;
std::ofstream ofs(PARAM.globalv.global_out_dir + "absorption.dat");
if (GlobalV::MY_RANK == 0) { ofs << "Frequency (eV) | wave length(nm) | Absorption (a.u.)" << std::endl; }

if (GlobalV::MY_RANK == 0)
{
ofs << "Frequency (eV) | wave length(nm) | Absorption (a.u.)" << std::endl;
}

double FourPI_div_c = ModuleBase::FOUR_PI / 137.036;
double fac = 4 * M_PI / ucell.omega * ModuleBase::e2 / this->nk; // e2 for Ry to Hartree in the denominator

for (int f = 0;f < freq.size();++f)
{
std::complex<double> f_complex = std::complex<double>(freq[f], eta);
Expand Down Expand Up @@ -297,4 +303,4 @@ void LR::LR_Spectrum<T>::write_transition_dipole(const std::string& filename)
}

template class LR::LR_Spectrum<double>;
template class LR::LR_Spectrum<std::complex<double>>;
template class LR::LR_Spectrum<std::complex<double>>;
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ smearing_sigma 0.002
mixing_type broyden
mixing_beta 0.7

dft_functional pz
out_ldos 1
stm_bias 2
File renamed without changes.
3 changes: 3 additions & 0 deletions tests/01_PW/001_PW_15_ONCV/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. SG15 ONCV pseudopotential
2. symmetry=on
3. test LDOS with 2 eV, output LDOS_2eV.cube
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions tests/01_PW/002_PW_15_f/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. SG15 pseudopotential with f electron
2. SCAN exchange-correlation functional
3. symmetry=on
4. init_chg=file
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ pseudo_dir ../../PP_ORB

#Parameters (2.Iteration)
ecutwfc 20
scf_thr 1e-8
scf_thr 1e-9
scf_nmax 100


#Parameters (3.Basis)
basis_type pw

#Parameters (4.Smearing)
smearing_method gauss
smearing_sigma 0.002
smearing_method gauss
smearing_sigma 0.002

#Parameters (5.Mixing)
mixing_type broyden
mixing_beta 0.7


pw_seed 1
dft_functional pz
File renamed without changes.
2 changes: 2 additions & 0 deletions tests/01_PW/003_PW_15_LDA/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. change the dft functional from readin PBE to pz LDA
2. Fermi-Dirac smearing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Al 26.98 Al.pbe-rrkj.UPF auto
LATTICE_CONSTANT
7.50


ATOMIC_POSITIONS
Direct

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pseudo_dir ../../PP_ORB
pw_seed 1

#Parameters (2.Iteration)
ecutwfc 20
ecutwfc 5
ecutrho 100
scf_thr 1e-9
scf_nmax 100
Expand Down
8 changes: 8 additions & 0 deletions tests/01_PW/020_PW_UPF201_USPP_NaCl/result.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
etotref -1229.8316890476023673
etotperatomref -614.9158445238
totalforceref 20.021968
totalstressref 32251.288376
pointgroupref C_2v
spacegroupref C_2v
nksibzref 2
totaltimeref 1.24
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions tests/01_PW/028_PW_PINT_UKS/INPUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
INPUT_PARAMETERS
suffix autotest

calculation scf
ecutwfc 5
scf_thr 1.0e-8
scf_nmax 50
out_chg 0

smearing_method gaussian
smearing_sigma 0.02

mixing_type pulay
mixing_beta 0.4
mixing_beta_mag 0.4

ks_solver cg
basis_type pw
gamma_only 1
nspin 2
pseudo_dir ../../../tests/PP_ORB
orbital_dir ../../../tests/PP_ORB
pw_seed 1

init_wfc nao
1 change: 1 addition & 0 deletions tests/01_PW/028_PW_PINT_UKS/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pw basis with the starting wave functions set to 'init_wfc nao' (nspin = 2, scf)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Fe_gga_9au_100Ry_4s2p2d1f.orb
Fe_gga_9au_100Ry_4s2p2d1f.orb

LATTICE_CONSTANT
15
10

LATTICE_VECTORS
1.00 0.50 0.50
Expand Down
3 changes: 3 additions & 0 deletions tests/01_PW/028_PW_PINT_UKS/result.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
etotref -4396.755790024687
etotperatomref -2198.3778950123
totaltimeref 0.36
File renamed without changes.
1 change: 1 addition & 0 deletions tests/01_PW/031_PW_15_CF_CS/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
calculate stress and force
File renamed without changes.
1 change: 1 addition & 0 deletions tests/01_PW/032_PW_15_CF_CS_bspline/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test B-spline interpolation for structure factor, *nbspline 20
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/01_PW/036_PW_AF/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fe Anti-ferromagnetic, nspin 2, init magnet: up + down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/01_PW/037_PW_FM/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fe Ferromagnetic, nspin 2, init magnet: up + up
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading