Skip to content

Pexsi stage4 pattern reuse opt#7392

Open
JohnHe233 wants to merge 23 commits into
deepmodeling:developfrom
JohnHe233:pexsi-stage4-pattern-reuse-opt
Open

Pexsi stage4 pattern reuse opt#7392
JohnHe233 wants to merge 23 commits into
deepmodeling:developfrom
JohnHe233:pexsi-stage4-pattern-reuse-opt

Conversation

@JohnHe233
Copy link
Copy Markdown

@JohnHe233 JohnHe233 commented May 29, 2026

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case
    tests for your pull request?
  • Have you noticed possible changes of behavior
    below or in the linked issue?
  • Have you explained the changes of codes in core
    modules of ESolver, HSolver, ElecState, Hamilt,
    Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #...

Unit Tests and/or Case Tests for my changes

  • Added/updated unit tests for the PEXSI abstraction
    and density-matrix related code paths.
  • Re-tested the official 10 LCAO examples with PEXSI,
    including Gamma-only and multi-k cases.
  • Compared Gamma-only PEXSI results against an origin/
    develop based branch using identical input files.
  • Tested selected systems from the 5.1 benchmark set
    with both conventional solver and PEXSI under multiple
    MPI sizes.
  • Verified that the current Gamma PEXSI path does not
    regress against origin/develop on the same inputs for
    the tested Gamma cases.

What's changed?

  • Added complex multi-k PEXSI support, including
    complex BCD-to-CCS / CCS-to-BCD matrix conversion,
    complex PEXSI driver calls, and density-matrix /
    energy-density-matrix writeback.
  • Added a PEXSI solver interface layer to reduce
    direct coupling between DiagoPexsi and the concrete
    PEXSI backend, making the code easier to test and
    extend.
  • Refactored DM/EDM buffer ownership to use safer
    container-managed storage while preserving the
    existing pointer-based call interface.
  • Added k-point parallel PEXSI execution support and
    global chemical-potential handling for multi-k
    calculations.
  • Aligned pexsi_temp with Fermi-Dirac smearing when
    appropriate.
  • Optimized BCD-to-CCS H/S redistribution by packing H
    and S values in one redistribution path.
  • Added timing labels for matrix conversion and PEXSI
    stages to help identify performance bottlenecks.
  • Preserved Gamma real PEXSI behavior for
    options.spin, while applying the spin handling
    needed by the complex multi-k path separately.
  • Documented performance, timeout causes, same-input
    Gamma comparison, and remaining bottlenecks in the
    LaTeX refactor report.

Any changes of core modules? (ignore if not

applicable)

  • HSolver: extended the PEXSI diagonalization path
    to support complex multi-k calculations and added the
    PEXSI abstraction interface.
  • ElecState: updated LCAO density-matrix handling so
    PEXSI-generated DM/EDM can be written back correctly.
  • module_pexsi: added complex matrix conversion,
    complex PEXSI execution, timing instrumentation, and
    safer ownership of intermediate buffers.
  • No intentional changes were made to unrelated
    ESolver, Hamilt, Operator, or Psi behavior.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need your .tex file in this PR

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the py code used for?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the py code used for?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need tex file in the code

@mohanchen mohanchen added Feature Discussed The features will be discussed first but will not be implemented soon Refactor Refactor ABACUS codes labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Discussed The features will be discussed first but will not be implemented soon Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants