Skip to content

[Bug] Diagonalization fails with info=2 when using scalapack_gvx as ks_solver #7338

@ZhouXY-PKU

Description

@ZhouXY-PKU

Describe the bug

Description:

When compiling ABACUS with the KML (Kunpeng Math Library) linear algebra package and ks_solver=sclapack_gvx, the SCF calculation fails during the diagonalization step. The program aborts with the following error output:

terminate called after throwing an instance of 'std::runtime_error'
what():  info = 2.

This issue does not occur when using the open-source ScaLAPACK/OpenBLAS combination,. It appears to be a specific compatibility issue between the ScaLAPACK implementation in KML and the parameters passed by ABACUS.

Analysis & Hypothesis:

The parameters abstol=0 and orfac=-1 are default values passed to the ScaLAPACK eigensolver (e.g., pdsygvx).

  • In standard open-source ScaLAPACK, passing abstol=0 usually prompts the library to use its internal safe default tolerance.
  • KML’s KScaLAPACK implementation might strictly validate these inputs or handle the 0/-1 defaults differently, resulting in an early return with info=2 (indicating an invalid argument or failure to converge due to zero tolerance).

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Verify the issue is not a duplicate.
  • Describe the bug.
  • Steps to reproduce.
  • Expected behavior.
  • Error message.
  • Environment details.
  • Additional context.
  • Assign a priority level (low, medium, high, urgent).
  • Assign the issue to a team member.
  • Label the issue with relevant tags.
  • Identify possible related issues.
  • Create a unit test or automated test to reproduce the bug (if applicable).
  • Fix the bug.
  • Test the fix.
  • Update documentation (if necessary).
  • Close the issue and inform the reporter (if applicable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugsBugs that only solvable with sufficient knowledge of DFTDiagoIssues related to diagonalizaiton methods

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions