You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor hsolver: drop dead global includes and GlobalV::DSIZE (#7865)
Step 1 — remove includes of global_variable.h / parameter.h from files
that no longer reference any symbol from them: diago_cusolver.cpp,
diago_pexsi.cpp, diago_elpa_native.cpp and module_pexsi/simple_pexsi.cpp.
Step 2 — remove GlobalV::DSIZE from the ScaLAPACK/LAPACK solvers:
* diago_scalapack.cpp: p?sygvx needs iclustr(2*NPROW*NPCOL) and
gap(NPROW*NPCOL) of the grid the descriptor lives on, which is not
necessarily the size of the diag world. Query the grid via
Cblacs_gridinfo() on desc[1] instead. This also fixes a latent
out-of-bounds read in post_processing() whenever the BLACS grid is
smaller than DSIZE; the loop now derives its bound from iclustr.
* diago_lapack.cpp: the serial LAPACK ?sygvx/?hegvx take no iclustr/gap
at all, so gap is dropped and iclustr becomes a single-process
placeholder.
No functional change for the existing single-grid runs.
Verified with MODULE_HSOLVER_LCAO (serial and 4 MPI ranks) and
MODULE_HSOLVER_diago_hs_parallel.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments