From 22964f0588719c4daae8cb07faa4e59ab026fe5b Mon Sep 17 00:00:00 2001 From: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:39:44 +0800 Subject: [PATCH] Perf: change default pw_seed=0 (#5179) * change default pw_seed=0 * fix pw_seed=1 in some cases * avoid multi-definition of pw_seed in INPUT * fix pw_seed=1 in GPU test --- source/module_parameter/input_parameter.h | 2 +- tests/integrate/101_PW_15_pseudopots_LibxcLDA/INPUT | 2 ++ tests/integrate/101_PW_GTH_CF_CS_Si/INPUT | 2 ++ tests/integrate/101_PW_lps6_pseudopots/INPUT | 2 ++ tests/integrate/101_PW_upf100_Rappe_Fe/INPUT | 2 ++ tests/integrate/101_PW_upf100_uspp_Fe/INPUT | 2 ++ tests/integrate/101_PW_upf201_uspp_Fe/INPUT | 2 ++ tests/integrate/102_PW_BPCG_GPU/INPUT | 2 ++ tests/integrate/103_PW_15_CS_CF/INPUT | 2 ++ tests/integrate/103_PW_15_CS_CF_bspline/INPUT | 2 ++ tests/integrate/103_PW_OU_CS_CF/INPUT | 2 ++ tests/integrate/104_PW_FM_magnetic/INPUT | 2 ++ tests/integrate/107_PW_OB_outputbands/INPUT | 2 ++ tests/integrate/107_PW_W90/INPUT | 2 ++ tests/integrate/107_PW_outWfcPw/INPUT | 2 ++ tests/integrate/107_PW_outWfcR/INPUT | 2 ++ tests/integrate/110_PW_SY/INPUT | 2 ++ tests/integrate/112_PW_dipole/INPUT | 2 ++ tests/integrate/112_PW_efield/INPUT | 2 ++ tests/integrate/113_PW_gatefield/INPUT | 2 ++ tests/integrate/114_PW_BD_15/INPUT | 2 ++ tests/integrate/115_PW_sol_H2O/INPUT | 2 ++ tests/integrate/116_PW_scan_Si2/INPUT | 2 ++ tests/integrate/118_PW_CHG_BINARY/INPUT | 2 ++ tests/integrate/120_PW_KP_MD_MSST/INPUT | 2 ++ tests/integrate/127_PW_15_PK_AF/INPUT | 2 ++ tests/integrate/140_PW_15_SO/INPUT | 2 ++ tests/integrate/801_PW_LT_sc/INPUT | 2 ++ 28 files changed, 55 insertions(+), 1 deletion(-) diff --git a/source/module_parameter/input_parameter.h b/source/module_parameter/input_parameter.h index c1a15fdebe..8d99331dd2 100644 --- a/source/module_parameter/input_parameter.h +++ b/source/module_parameter/input_parameter.h @@ -47,7 +47,7 @@ struct Input_para bool diago_full_acc = false; ///< all the empty states are diagonalized std::string init_wfc = "atomic"; ///< "file","atomic","random" bool psi_initializer = false; ///< whether use psi_initializer to initialize wavefunctions - int pw_seed = 1; ///< random seed for initializing wave functions qianrui 2021-8-12 + int pw_seed = 0; ///< random seed for initializing wave functions std::string init_chg = "atomic"; ///< "file","atomic" bool dm_to_rho = false; ///< read density matrix from npz format and calculate charge density std::string chg_extrap = "default"; ///< xiaohui modify 2015-02-01 diff --git a/tests/integrate/101_PW_15_pseudopots_LibxcLDA/INPUT b/tests/integrate/101_PW_15_pseudopots_LibxcLDA/INPUT index 96a7d117e1..e46ac262e8 100644 --- a/tests/integrate/101_PW_15_pseudopots_LibxcLDA/INPUT +++ b/tests/integrate/101_PW_15_pseudopots_LibxcLDA/INPUT @@ -28,3 +28,5 @@ dft_functional XC_LDA_X+XC_LDA_C_PZ cal_force 1 cal_stress 1 + +pw_seed 1 diff --git a/tests/integrate/101_PW_GTH_CF_CS_Si/INPUT b/tests/integrate/101_PW_GTH_CF_CS_Si/INPUT index 865002a7a1..376e57192b 100644 --- a/tests/integrate/101_PW_GTH_CF_CS_Si/INPUT +++ b/tests/integrate/101_PW_GTH_CF_CS_Si/INPUT @@ -20,3 +20,5 @@ mixing_beta 0.7 mixing_gg0 1.5 pseudo_dir ../../PP_ORB + +pw_seed 1 diff --git a/tests/integrate/101_PW_lps6_pseudopots/INPUT b/tests/integrate/101_PW_lps6_pseudopots/INPUT index 367c0254c8..54ac435ade 100644 --- a/tests/integrate/101_PW_lps6_pseudopots/INPUT +++ b/tests/integrate/101_PW_lps6_pseudopots/INPUT @@ -25,3 +25,5 @@ dft_functional pbe #Parameters (5.Mixing) mixing_type broyden mixing_beta 0.7 + +pw_seed 1 diff --git a/tests/integrate/101_PW_upf100_Rappe_Fe/INPUT b/tests/integrate/101_PW_upf100_Rappe_Fe/INPUT index 98793a09e5..e38a7a16d9 100644 --- a/tests/integrate/101_PW_upf100_Rappe_Fe/INPUT +++ b/tests/integrate/101_PW_upf100_Rappe_Fe/INPUT @@ -27,3 +27,5 @@ mixing_gg0 1.0 cal_force 1 cal_stress 1 + +pw_seed 1 diff --git a/tests/integrate/101_PW_upf100_uspp_Fe/INPUT b/tests/integrate/101_PW_upf100_uspp_Fe/INPUT index 1f9e53c1e0..761237e9c5 100644 --- a/tests/integrate/101_PW_upf100_uspp_Fe/INPUT +++ b/tests/integrate/101_PW_upf100_uspp_Fe/INPUT @@ -32,3 +32,5 @@ pseudo_rcut 10 cal_force 1 cal_stress 1 + +pw_seed 1 diff --git a/tests/integrate/101_PW_upf201_uspp_Fe/INPUT b/tests/integrate/101_PW_upf201_uspp_Fe/INPUT index 27d5dcb5a4..f0a3784a14 100644 --- a/tests/integrate/101_PW_upf201_uspp_Fe/INPUT +++ b/tests/integrate/101_PW_upf201_uspp_Fe/INPUT @@ -35,3 +35,5 @@ cal_force 1 cal_stress 1 kpar 3 + +pw_seed 1 diff --git a/tests/integrate/102_PW_BPCG_GPU/INPUT b/tests/integrate/102_PW_BPCG_GPU/INPUT index 79a14084de..1f24602487 100644 --- a/tests/integrate/102_PW_BPCG_GPU/INPUT +++ b/tests/integrate/102_PW_BPCG_GPU/INPUT @@ -32,3 +32,5 @@ cal_stress 1 mixing_type broyden mixing_beta 0.4 mixing_gg0 1.5 + +pw_seed 1 diff --git a/tests/integrate/103_PW_15_CS_CF/INPUT b/tests/integrate/103_PW_15_CS_CF/INPUT index c783334fe8..bdf69f92aa 100644 --- a/tests/integrate/103_PW_15_CS_CF/INPUT +++ b/tests/integrate/103_PW_15_CS_CF/INPUT @@ -31,3 +31,5 @@ cal_stress 1 mixing_type broyden mixing_beta 0.4 mixing_gg0 1.5 + +pw_seed 1 diff --git a/tests/integrate/103_PW_15_CS_CF_bspline/INPUT b/tests/integrate/103_PW_15_CS_CF_bspline/INPUT index b4034e604b..b30bb33ec8 100644 --- a/tests/integrate/103_PW_15_CS_CF_bspline/INPUT +++ b/tests/integrate/103_PW_15_CS_CF_bspline/INPUT @@ -32,3 +32,5 @@ mixing_type broyden mixing_beta 0.4 mixing_gg0 1.5 nbspline 20 + +pw_seed 1 diff --git a/tests/integrate/103_PW_OU_CS_CF/INPUT b/tests/integrate/103_PW_OU_CS_CF/INPUT index 9b68f4388f..0e623ef6d5 100644 --- a/tests/integrate/103_PW_OU_CS_CF/INPUT +++ b/tests/integrate/103_PW_OU_CS_CF/INPUT @@ -33,3 +33,5 @@ cal_stress 1 mixing_type broyden mixing_beta 0.4 mixing_gg0 1.5 + +pw_seed 1 diff --git a/tests/integrate/104_PW_FM_magnetic/INPUT b/tests/integrate/104_PW_FM_magnetic/INPUT index a0dc2f1fa4..3e35f70dec 100644 --- a/tests/integrate/104_PW_FM_magnetic/INPUT +++ b/tests/integrate/104_PW_FM_magnetic/INPUT @@ -26,3 +26,5 @@ basis_type pw symmetry 1 pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB + +pw_seed 1 diff --git a/tests/integrate/107_PW_OB_outputbands/INPUT b/tests/integrate/107_PW_OB_outputbands/INPUT index 9e45150d59..ded78ffae6 100644 --- a/tests/integrate/107_PW_OB_outputbands/INPUT +++ b/tests/integrate/107_PW_OB_outputbands/INPUT @@ -31,3 +31,5 @@ smearing_sigma 0.002 mixing_type plain mixing_beta 0.7 + +pw_seed 1 diff --git a/tests/integrate/107_PW_W90/INPUT b/tests/integrate/107_PW_W90/INPUT index 117a2ee966..f088e3a40f 100644 --- a/tests/integrate/107_PW_W90/INPUT +++ b/tests/integrate/107_PW_W90/INPUT @@ -14,3 +14,5 @@ symmetry 0 towannier90 1 nnkpfile diamond.nnkp read_file_dir ./ + +pw_seed 1 diff --git a/tests/integrate/107_PW_outWfcPw/INPUT b/tests/integrate/107_PW_outWfcPw/INPUT index a42633a20a..b457945091 100644 --- a/tests/integrate/107_PW_outWfcPw/INPUT +++ b/tests/integrate/107_PW_outWfcPw/INPUT @@ -16,3 +16,5 @@ scf_nmax 100 basis_type pw out_wfc_pw 1 + +pw_seed 1 diff --git a/tests/integrate/107_PW_outWfcR/INPUT b/tests/integrate/107_PW_outWfcR/INPUT index 3b8e62abd0..1c11d476cf 100644 --- a/tests/integrate/107_PW_outWfcR/INPUT +++ b/tests/integrate/107_PW_outWfcR/INPUT @@ -16,3 +16,5 @@ scf_nmax 100 basis_type pw out_wfc_r 1 + +pw_seed 1 diff --git a/tests/integrate/110_PW_SY/INPUT b/tests/integrate/110_PW_SY/INPUT index 933789c832..5c14639acb 100644 --- a/tests/integrate/110_PW_SY/INPUT +++ b/tests/integrate/110_PW_SY/INPUT @@ -25,3 +25,5 @@ dft_functional XC_GGA_X_PBE+XC_GGA_C_PBE cal_force 1 cal_stress 1 + +pw_seed 1 diff --git a/tests/integrate/112_PW_dipole/INPUT b/tests/integrate/112_PW_dipole/INPUT index 67fb24bafc..22b9b9a172 100644 --- a/tests/integrate/112_PW_dipole/INPUT +++ b/tests/integrate/112_PW_dipole/INPUT @@ -29,3 +29,5 @@ efield_pos_dec 0.1 efield_amp 0.01 cal_force 1 cal_stress 1 + +pw_seed 1 diff --git a/tests/integrate/112_PW_efield/INPUT b/tests/integrate/112_PW_efield/INPUT index f674fe18bb..e6ea9fe492 100644 --- a/tests/integrate/112_PW_efield/INPUT +++ b/tests/integrate/112_PW_efield/INPUT @@ -27,3 +27,5 @@ efield_flag 1 dip_cor_flag 0 cal_force 1 cal_stress 1 + +pw_seed 1 diff --git a/tests/integrate/113_PW_gatefield/INPUT b/tests/integrate/113_PW_gatefield/INPUT index 382e7061a2..d669d47ca6 100644 --- a/tests/integrate/113_PW_gatefield/INPUT +++ b/tests/integrate/113_PW_gatefield/INPUT @@ -33,3 +33,5 @@ cal_stress 1 gate_flag 1 zgate 0.2 nelec 7 + +pw_seed 1 diff --git a/tests/integrate/114_PW_BD_15/INPUT b/tests/integrate/114_PW_BD_15/INPUT index cfcbca9950..3f9d9ddcce 100644 --- a/tests/integrate/114_PW_BD_15/INPUT +++ b/tests/integrate/114_PW_BD_15/INPUT @@ -24,3 +24,5 @@ smearing_sigma 0.002 mixing_type broyden mixing_beta 0.7 + +pw_seed 1 diff --git a/tests/integrate/115_PW_sol_H2O/INPUT b/tests/integrate/115_PW_sol_H2O/INPUT index 30e6e83703..94d7e0e357 100644 --- a/tests/integrate/115_PW_sol_H2O/INPUT +++ b/tests/integrate/115_PW_sol_H2O/INPUT @@ -18,3 +18,5 @@ eb_k 80 tau 0.000010798 sigma_k 0.6 nc_k 0.00037 + +pw_seed 1 diff --git a/tests/integrate/116_PW_scan_Si2/INPUT b/tests/integrate/116_PW_scan_Si2/INPUT index 8135ff1341..2e9a4ec38b 100644 --- a/tests/integrate/116_PW_scan_Si2/INPUT +++ b/tests/integrate/116_PW_scan_Si2/INPUT @@ -28,3 +28,5 @@ cal_force 1 cal_stress 1 mixing_tau 1 + +pw_seed 1 diff --git a/tests/integrate/118_PW_CHG_BINARY/INPUT b/tests/integrate/118_PW_CHG_BINARY/INPUT index bd9a67afd4..20e786ba0e 100644 --- a/tests/integrate/118_PW_CHG_BINARY/INPUT +++ b/tests/integrate/118_PW_CHG_BINARY/INPUT @@ -31,3 +31,5 @@ cal_stress 1 init_chg auto read_file_dir . + +pw_seed 1 diff --git a/tests/integrate/120_PW_KP_MD_MSST/INPUT b/tests/integrate/120_PW_KP_MD_MSST/INPUT index 8d1269b65f..b110b0a8da 100644 --- a/tests/integrate/120_PW_KP_MD_MSST/INPUT +++ b/tests/integrate/120_PW_KP_MD_MSST/INPUT @@ -32,3 +32,5 @@ init_vel 1 msst_qmass 1 msst_vel 10 + +pw_seed 1 diff --git a/tests/integrate/127_PW_15_PK_AF/INPUT b/tests/integrate/127_PW_15_PK_AF/INPUT index ab0934aa84..5ad0ffb4ae 100644 --- a/tests/integrate/127_PW_15_PK_AF/INPUT +++ b/tests/integrate/127_PW_15_PK_AF/INPUT @@ -31,3 +31,5 @@ symmetry 0 nspin 2 pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB + +pw_seed 1 diff --git a/tests/integrate/140_PW_15_SO/INPUT b/tests/integrate/140_PW_15_SO/INPUT index d68a3f4146..fc09132c7c 100644 --- a/tests/integrate/140_PW_15_SO/INPUT +++ b/tests/integrate/140_PW_15_SO/INPUT @@ -38,3 +38,5 @@ pw_diag_thr 0.00001 mixing_type broyden mixing_beta 0.4 mixing_gg0 1.5 + +pw_seed 1 diff --git a/tests/integrate/801_PW_LT_sc/INPUT b/tests/integrate/801_PW_LT_sc/INPUT index f658549dcb..92b92f0614 100644 --- a/tests/integrate/801_PW_LT_sc/INPUT +++ b/tests/integrate/801_PW_LT_sc/INPUT @@ -16,3 +16,5 @@ scf_thr 1e-10 cal_force 1 cal_stress 1 + +pw_seed 1