Skip to content

Bug: std::bad_alloc crash during charge initialization when using older LDA (pz-vbc) UPF pseudopotentials #7208

@AsTonyshment

Description

@AsTonyshment

Describe the bug

I encountered a segmentation fault (std::bad_alloc) when running an LCAO calculation using specific pseudopotential files (C.pz-vbc.UPF and H.pz-vbc.UPF). The crash occurs very early in the initialization phase, specifically right after START CHARGE : atomic.

When I swap the pseudopotentials to standard ONCVPSP ones (C_ONCV_PBE-1.0.upf and H_ONCV_PBE-1.0.upf) while keeping the INPUT parameters exactly the same, the program runs perfectly without any memory allocation errors.

It seems the program struggles to parse or allocate memory correctly for these specific .pz-vbc.UPF files (which appear to be an older format generated by ld1 around 1990). Even if these older formats are deprecated, it would be better for ABACUS to throw a graceful and informative error rather than a std::bad_alloc termination.

To Reproduce

I have attached a compressed archive (test.tar.gz) containing two directories:

  1. VBC/ - Contains the STRU with the .pz-vbc.UPF pseudopotentials (Crashes).
  2. ONCV/ - Contains the exact same INPUT but uses _ONCV_PBE-1.0.upf pseudopotentials (Works).

test.tar.gz

Environment

  • ABACUS Version: v3.9.0.24 (Commit: 06fb9685b)
  • Device: CPU (Intel Xeon Gold 6348)
  • MPI/Threads: 4 MPI processes, 14 OpenMP threads
  • Basis: LCAO
  • esolver_type: tddft (though likely a generic SCF/initialization issue)

Metadata

Metadata

Assignees

Labels

BugsBugs that only solvable with sufficient knowledge of DFT

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions