deepmodeling / abacus-develop

An electronic structure package based on either plane wave basis or numerical atomic orbitals.
http://abacus.ustc.edu.cn
GNU Lesser General Public License v3.0
174 stars 136 forks source link

force compute error in Fe128 in lcao #3994

Closed A-006 closed 6 months ago

A-006 commented 7 months ago

Describe the bug

when i use abacus to calculate force in Fe128,the force is not same when i try. I use MPI=4 and openmp=7 to compute this case, however the result came as image image and the INPUT file set as below INPUT_PARAMETERS

Parameters (1.General)

suffix autotest calculation scf

nbands 8

symmetry 1

Parameters (2.Iteration)

ks_solver genelpa cal_stress 1 cal_force 1 gamma_only 1 ecutwfc 100 scf_thr 1e-6 scf_nmax 100

Parameters (3.Basis)

basis_type lcao

Parameters (4.Smearing)

smearing_method gauss smearing_sigma 0.002

Parameters (5.Mixing)

mixing_type pulay mixing_beta 0.3 ks_solver genelpa gamma_only 1 cal_stress 1 cal_force 1

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

WHUweiqingzhou commented 7 months ago

@A-006, Do you mean you get the different force by using different parallel settings. I will suggest you decrease scf_thr, f.e, scf_thr=1e-8 even less since force and stress is more sensitive compared with charge density and energy.

WHUweiqingzhou commented 6 months ago

@A-006 any update?

A-006 commented 6 months ago

I set scf_thr=1e-8, but the calculation still couldn't converge. When I changed the settings to scf_thr=1e-7, MPI=1, and OPENMP=1, the results of the force calculation continued to differ. I suspect that there are small variations in rho with each iteration. As a result, while the stress calculations appear correct, the forces remain inconsistent.