-
Notifications
You must be signed in to change notification settings - Fork 219
Bug: std::bad_alloc crash during charge initialization when using older LDA (pz-vbc) UPF pseudopotentials #7208
Description
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:
VBC/- Contains theSTRUwith the.pz-vbc.UPFpseudopotentials (Crashes).ONCV/- Contains the exact sameINPUTbut uses_ONCV_PBE-1.0.upfpseudopotentials (Works).
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)