Skip to content

[LCAO-HSE] Segmentation fault at the first EXX update after SCF mixing restart #7774

Description

@yangxl-yuanpei

Describe the bug

A spin-polarized LCAO-HSE calculation terminates with a segmentation fault when mixing_restart > 0 and mixing_dmr = 1 are enabled together with exx_separate_loop = 0.

The initial GGA SCF proceeds normally. After mixing_restart is triggered, the GGA SCF converges successfully. However, ABACUS crashes immediately after printing:

Entering 2nd SCF, where EXX is updated

No HSE electronic iteration is completed after this message.

The error is a segmentation fault rather than an explicit out-of-memory termination. Multiple MPI ranks report either Address not mapped or Invalid permissions.

The calculation runs on a 104-atom spin-polarized system at the Gamma point with 1528 numerical atomic orbitals.

Expected behavior

After the initial GGA SCF converges, ABACUS should enter the HSE SCF loop and update the EXX Hamiltonian without crashing.

If density-matrix mixing is not supported for this HSE workflow, ABACUS should terminate with a clear diagnostic message rather than a segmentation fault.

To Reproduce

Use ABACUS v3.10.1, commit 0934754.
Run the attached spin-polarized LCAO-HSE calculation using 6 MPI processes and 16 OpenMP threads per MPI process.
Use the following relevant parameters:
basis_type lcao
dft_functional HSE
nspin 2
gamma_only 1

exx_separate_loop 0

mixing_beta 0.2
mixing_beta_mag 0.8
mixing_ndim 24
mixing_restart 1e-04

case.tar.gz

mixing_dmr 1
The SCF restart is triggered during the initial GGA loop. In the attached run, the relevant output is:
GE16 ... DRHO = 8.7796e-05
SCF restart after this step!
The restarted GGA SCF subsequently reaches:
GE40 ... DRHO = 9.9553e-08
Entering 2nd SCF, where EXX is updated
ABACUS then terminates immediately with:
Signal: Segmentation fault (11)
Signal code: Address not mapped

or

Signal: Segmentation fault (11)
Signal code: Invalid permissions

The complete input files, submission script, and output log are attached.

Environment

OS: Debian GNU/Linux 12 (bookworm)
Compiler: GCC 12.2.0
Dependencies: OpenBLAS, LAPACK, ScaLAPACK-OpenMPI 2.2, ELPA 19, FFTW3, Open MPI 4.1.4

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions