SRC/chbevx_2stage.f(3)
okay bestie, welcome to SRC/chbevx_2stage.f(3) from the Library Functions Manual β it's giving main-character Fortran energy and we're obsessed π
β¨
πΈ NAME πΈ
SRC/chbevx_2stage.f β that's the file, periodt.
β¨ SYNOPSIS β¨
π« Functions/Subroutines π«
okay so this page is literally about one function/subroutine, and here's its exact signature β copy it character for character, no cap:
subroutine chbevx_2stage (jobz, range, uplo, n, kd, ab, ldab, q, ldq,
vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork,
ifail, info)
And what does it do? CHBEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices π¦π₯
π Function/Subroutine Documentation π
okay bestie, buckle up, because here's the actual signature β every argument, exactly as written, no cap:
subroutine chbevx_2stage (character jobz, character range, character uplo,
integer n, integer kd, complex, dimension( ldab, * ) ab, integer ldab,
complex, dimension( ldq, * ) q, integer ldq, real vl, real vu, integer
il, integer iu, real abstol, integer m, real, dimension( * ) w, complex,
dimension( ldz, * ) z, integer ldz, complex, dimension( * ) work,
integer lwork, real, dimension( * ) rwork, integer, dimension( * )
iwork, integer, dimension( * ) ifail, integer info)
CHBEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices. (yes, the all-caps OTHER is doing main character energy, we love that for it π
)
β¨ Purpose β¨
so what does it actually do? CHBEVX_2STAGE computes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian band matrix** A using the 2stage technique for the reduction to tridiagonal. π¦
and like, you don't have to take all the eigenvalues β you can pick which ones you want by giving either a range of values or a range of indices. iconic behavior, honestly. obsessed. β¨
πΈ Parameters πΈ
big list energy, but every single one matters. let's go π«Ά
JOBZ
JOBZ is CHARACTER*1
'N'β compute eigenvalues only;'V'β compute eigenvalues and eigenvectors.
π¨ and 'V' is not available in this release. so like, don't come for me when it doesn't work, the source said it first. π
RANGE
RANGE is CHARACTER*1
'A'β all eigenvalues will be found;'V'β all eigenvalues in the half-open interval(VL,VU]will be found;'I'β theIL-th throughIU-th eigenvalues will be found.
UPLO
UPLO is CHARACTER*1
'U'β upper triangle ofAis stored;'L'β lower triangle ofAis stored.
N
N is INTEGER
the order of the matrix A. N >= 0.
KD
KD is INTEGER
the number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0.
AB
AB is COMPLEX array, dimension (LDAB, N)
on entry, the upper or lower triangle of the Hermitian band matrix A, stored in the first KD+1 rows of the array. the j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
on exit, AB is overwritten by values generated during the reduction to tridiagonal form. (so if you needed that original matrixβ¦ girl. it's gone. π)
LDAB
LDAB is INTEGER
the leading dimension of the array AB. LDAB >= KD + 1.
Q
Q is COMPLEX array, dimension (LDQ, N)
- if
JOBZ = 'V', theN-by-Nunitary matrix used in the reduction to tridiagonal form. - if
JOBZ = 'N', the arrayQis not referenced.
LDQ
LDQ is INTEGER
the leading dimension of the array Q. if JOBZ = 'V', then LDQ >= max(1,N).
VL
VL is REAL
if RANGE='V', the lower bound of the interval to be searched for eigenvalues. VL < VU. not referenced if RANGE = 'A' or 'I'.
VU
VU is REAL
if RANGE='V', the upper bound of the interval to be searched for eigenvalues. VL < VU. not referenced if RANGE = 'A' or 'I'.
IL
IL is INTEGER
if RANGE='I', the index of the smallest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. not referenced if RANGE = 'A' or 'V'.
IU
IU is INTEGER
if RANGE='I', the index of the largest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. not referenced if RANGE = 'A' or 'V'.
ABSTOL
ABSTOL is REAL
the absolute error tolerance for the eigenvalues. an approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. if ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AB to tridiagonal form.
eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH('S'), not zero. π€ if this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH('S'). fr fr, that's the move.
π the source says: See by Demmel and Kahan, LAPACK Working Note #3. β yes there's literally a gap where a paper title should be. someone left a TODO in prod and honestly? relatable. π
M
M is INTEGER
the total number of eigenvalues found. 0 <= M <= N. if RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
W
W is REAL array, dimension (N)
the first M elements contain the selected eigenvalues in ascending order. β¨
Z
Z is COMPLEX array, dimension (LDZ, max(1,M))
- if
JOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with thei-th column ofZholding the eigenvector associated withW(i). - if an eigenvector fails to converge, then that column of
Zcontains the latest approximation to the eigenvector, and the index of the eigenvector is returned inIFAIL. - if
JOBZ = 'N', thenZis not referenced.
β οΈ note: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ; ifRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used. so like, allocate generously bestie, don't be stingy π
LDZ
LDZ is INTEGER
the leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
WORK
WORK is COMPLEX array, dimension (LWORK)
LWORK
LWORK is INTEGER
the length of the array WORK. LWORK >= 1, when N <= 1; otherwise:
if JOBZ = 'N' and N > 1, LWORK must be queried:
LWORK = MAX(1, dimension) where
dimension = (2KD+1)*N + KD*NTHREADS
where KD is the size of the band.
NTHREADS is the number of threads used when
openMP compilation is enabled, otherwise =1.
if JOBZ = 'V' and N > 1, LWORK must be queried. not yet available. π«
π‘ ifLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORK,RWORKandIWORKarrays, returns these values as the first entries of theWORK,RWORKandIWORKarrays, and no error message related toLWORKorLRWORKorLIWORKis issued byXERBLA.
RWORK
RWORK is REAL array, dimension (7*N)
IWORK
IWORK is INTEGER array, dimension (5*N)
IFAIL
IFAIL is INTEGER array, dimension (N)
if JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL are zero. if INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge. if JOBZ = 'N', then IFAIL is not referenced.
INFO
INFO is INTEGER
= 0β successful exit β¨< 0β ifINFO = -i, thei-th argument had an illegal value π¬> 0β ifINFO = i, thenieigenvectors failed to converge. their indices are stored in arrayIFAIL. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
(the whole squad, we stan collaboration π«Ά)
π§ Further Details π§
all details about the 2stage techniques are available in:
Azzam Haidar, Hatem Ltaief, and Jack Dongarra. Parallel reduction to condensed forms for symmetric eigenvalue problems using aggregated fine-grained and memory-aware kernels. In Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '11), New York, NY, USA, Article 8, 11 pages. http://doi.acm.org/10.1145/2063384.2063394
A. Haidar, J. Kurzak, P. Luszczek, 2013. An improved parallel singular value algorithm and its implementation for multicore hardware, In Proceedings of 2013 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '13). Denver, Colorado, USA, 2013. Article 90, 12 pages. http://doi.acm.org/10.1145/2503210.2503292
A. Haidar, R. Solca, S. Tomov, T. Schulthess and J. Dongarra. A novel hybrid CPU-GPU generalized eigensolver for electronic structure calculations based on fine-grained memory aware tasks. International Journal of High Performance Computing Applications. Volume 28 Issue 2, Pages 196-209, May 2014. http://hpc.sagepub.com/content/28/2/196
definition at line 323 of file chbevx_2stage.f.
π Author π
generated automatically by Doxygen for LAPACK from the source code. (not me writing my own biography, the machine did it π)
and that's the whole page, bestie β LAPACK, Version 3.12.0, from SRC/chbevx_2stage.f(3). go forth and compute those selected eigenvalues, you absolute icon πβ¨π
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms