Skip to content

ORCA 6 ECP Molden: SIGSEGV in genP after spherical-basis back conversion #50

Description

@Stardust0831

Reproducer

ORCA 6.1 orca_2mkl -molden output for an ECP-containing closed-shell calculation triggers a deterministic SIGSEGV during loading.

  • Method: wB97M-V def2-TZVP def2/J RIJCOSX gCP(DFT/TZ)
  • ECP elements: I (def2-ECP, 25 effective charge); analogous failures occur for Pb and Cs/I systems.
  • Minimal observed case: CGBA_HCl_FAI_sp_full.molden.input (38 atoms, 778 spherical basis functions, 778 MOs, 184 electrons, 92 occupied MOs).

Correct ECP metadata

The ORCA file contains:

[Pseudo]
I 38 25

A correct Multiwfn-style supplement is:

[Nval]
I 25

Multiwfn confirms Nuclear charge of I has been set to 25, so the ECP charge is parsed correctly. Replacing [Pseudo] with this correct two-column [Nval], or retaining both sections, does not avoid the crash.

Failure point

Both the existing 3.8-dev binary and the official 2026.7.15 Linux noGUI binary stop after:

Converting basis function information to GTF information...
Back converting basis function information from Cartesian to spherical type...
Generating density matrix...
forrtl: severe (174): SIGSEGV, segmentation fault occurred

The source path is fileIO.f90 ORCA Molden loading / spherical conversion followed by call genP; genP calls matmul_blas on CObasa without prior shape/content diagnostics.

Requested fix

Please add a minimal guard before the density-matrix BLAS call: validate the coefficient matrix dimensions and occupied-MO count, then produce a controlled diagnostic rather than SIGSEGV. A debug build with bounds checking should identify the exact invalid access if present.

This issue is being used to track a minimal noGUI Linux/Windows fix and CI artifact validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions