Open maki49 opened 3 months ago
Here is the part that calculates Cu
examples/scf/lcao_Cu/INPUT INPUT_PARAMETERS pseudo_dir ../../../tests/PP_ORB orbital_dir ../../../tests/PP_ORB nbands 10 calculation scf ecutwfc 100 scf_thr 1.0e-8 scf_nmax 100 smearing_method gaussian smearing_sigma 0.02 mixing_type broyden mixing_beta 0.4 basis_type lcao gamma_only 0 cal_force 1 cal_stress 1 nspin 2 out_mat_dh 1
1.The calculation results are consistent whether OpenMP is used or not. 2.Whether or not it is accumulated to pvdpRy_reduced, the result is consistent.
What part is this function used to calculate?
in the PR #4827 ,i add the openmp gather in the source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp:204-223。now the dvlocal has been add to the openmp.Can pvdpRx_reduced be correctly calculated now?
Now the calculation result of gint_kernel_dvlocal will be copied to pvdpRx_reduced. It is not clear whether the calculation result is correct, and it is necessary to understand how to handle the calculation result of dv. Is there a way to add unit tests here?
Details
out_mat_dh
calculates only the Pulay term $\braket{\phi|H|d\phi}$ while the Hellmann-Feynman term $\braket{\phi|dH|\phi}$ is missing? (see the implementation insparse_format::cal_dH
)Gint::cpu_dvlocal_interface
(only used when out_mat_dh=1 and nspin=2), @A-006 finds thatpvdpRx_thread
is calculated but not copied intopvdpRx_reduced
, which makes the results different with or without OpenMP.