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
164 stars 128 forks source link

ABACUS crashes when doing relax with gamma_only #2643

Closed Satinelamp closed 2 months ago

Satinelamp commented 1 year ago

Describe the bug

I am trying to set gamma_only = 1 to accelerate ABACUS, but there is an error showing that

terminate called after throwing an instance of 'std::runtime_error'
  what():  info = 2.
/home/software/abacus-develop/source/module_hsolver/diago_blas.cpp line 343.
degeneracy_need = 206.
degeneracy_saved = 206.

Here is the input file and log ABACUS-gammaonly-error.zip

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

hongriTianqi commented 1 year ago
haozhihan commented 11 months ago

The basis_type of this case is lcao.

pxlxingliang commented 2 months ago

Hi @Satinelamp, the error message is about the solve of eigenvalue by scalapack, and the return info is 2, which means:

If mod(info/2, 2) ≠ 0, then the eigenvectors corresponding to one or more clusters of eigenvalues could not be reorthogonalized because of insufficient workspace. The indices of the clusters are stored in iclustr." (https://www.ibm.com/docs/en/pessl/5.3.0?topic=easva-pdsygvx-pzhegvx-selected-eigenvalues-optionally-eigenvectors-real-symmetric-complex-hermitian-positive-definite-generalized-eigenproblem)

The process of diagonalization by scalapack is related to the number of parallel cores, and you can try to use more or less parallel cores or use genelpa to do the calculation.

I have tested by using 8 cores, and there is no error throwed:

 Initial plane wave basis and FFT box
 ---------------------------------------------------------
 -------------------------------------------
 STEP OF RELAXATION : 1
 -------------------------------------------
 START CHARGE      : atomic
 DONE(15.5546    SEC) : INIT SCF
 ITER   ETOT(eV)       EDIFF(eV)      DRHO       TIME(s)    
 GV1    -7.392859e+04  0.000000e+00   1.778e-01  3.796e+01  
 GV2    -7.393608e+04  -7.487902e+00  8.431e-02  2.913e+01  
 GV3    -7.392063e+04  1.544507e+01   6.397e-02  2.905e+01  
 GV4    -7.395205e+04  -3.142076e+01  4.780e-02  2.919e+01  
 GV5    -7.395633e+04  -4.277375e+00  4.062e-02  2.921e+01  
 GV6    -7.395391e+04  2.418247e+00   2.886e-02  2.924e+01  
 GV7    -7.395429e+04  -3.811894e-01  1.489e-02  2.977e+01