realSYeigen(3)
๐ NAME ๐
okay so this is the manual page for realSYeigen(3) from LAPACK, and the NAME section is literally realSYeigen โ real. bestie, that's it. No cap.
โจ SYNOPSIS โจ
๐ฆ Functions ๐ฆ
Here's the whole squad of real symmetric eigenvalue driver routines:
subroutine ssyev (JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)โ SSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssyev_2stage (JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)โ SSYEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssyevd (JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK, LIWORK, INFO)โ SSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssyevd_2stage (JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK, LIWORK, INFO)โ SSYEVD_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssyevr (JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)โ SSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssyevr_2stage (JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)โ SSYEVR_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssyevx (JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)โ SSYEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssyevx_2stage (JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)โ SSYEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matricessubroutine ssygv (ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, INFO)โ SSYGVsubroutine ssygv_2stage (ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, INFO)โ SSYGV_2STAGEsubroutine ssygvd (ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, IWORK, LIWORK, INFO)โ SSYGVDsubroutine ssygvx (ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)โ SSYGVX
๐ Detailed Description ๐
This is the group of real eigenvalue driver functions for SY matrices. Periodt.
๐ Function Documentation ๐
๐ subroutine ssyev ... ๐
Signature time, bestie:
subroutine ssyev (character JOBZ, character UPLO, integer N, real,
dimension( lda, * ) A, integer LDA, real, dimension( * ) W, real,
dimension( * ) WORK, integer LWORK, integer INFO)
SSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices.
๐ฏ Purpose ๐ฏ
Okay so SSYEV computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A.
๐๏ธ Parameters ๐๏ธ
JOBZโJOBZ is CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLO is CHARACTER*1= 'U': Upper triangle of A is stored;= 'L': Lower triangle of A is stored.
NโN is INTEGER- The order of the matrix
A.N >= 0.
- The order of the matrix
AโA is REAL array, dimension (LDA, N)- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - On exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the orthonormal eigenvectors of the matrixA. - If
JOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed.
- On entry, the symmetric matrix
LDAโLDA is INTEGER- The leading dimension of the array
A.LDA >= max(1,N).
- The leading dimension of the array
WโW is REAL array, dimension (N)- If
INFO = 0, the eigenvalues in ascending order.
- If
WORKโWORK is REAL array, dimension (MAX(1,LWORK))- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK.
- On exit, if
LWORKโLWORK is INTEGER- The length of the array
WORK.LWORK >= max(1,3*N-1). - For optimal efficiency,
LWORK >= (NB+2)*N, whereNBis the blocksize forSSYTRDreturned byILAENV. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
- The length of the array
INFOโINFO is INTEGER= 0: successful exit< 0: if INFO = -i, the i-th argument had an illegal value> 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.
โ๏ธ Author โ๏ธ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ subroutine ssyev_2stage ... ๐
Now the 2stage version, because we love a glow-up:
subroutine ssyev_2stage (character JOBZ, character UPLO, integer N, real,
dimension( lda, * ) A, integer LDA, real, dimension( * ) W, real,
dimension( * ) WORK, integer LWORK, integer INFO)
SSYEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices.
๐ฏ Purpose ๐ฏ
SSYEV_2STAGE computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A using the 2stage technique for the reduction to tridiagonal.
๐๏ธ Parameters ๐๏ธ
JOBZโJOBZ is CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.- Not available in this release.
UPLOโUPLO is CHARACTER*1= 'U': Upper triangle of A is stored;= 'L': Lower triangle of A is stored.
NโN is INTEGER- The order of the matrix
A.N >= 0.
- The order of the matrix
AโA is REAL array, dimension (LDA, N)- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - On exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the orthonormal eigenvectors of the matrixA. - If
JOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed.
- On entry, the symmetric matrix
LDAโLDA is INTEGER- The leading dimension of the array
A.LDA >= max(1,N).
- The leading dimension of the array
WโW is REAL array, dimension (N)- If
INFO = 0, the eigenvalues in ascending order.
- If
WORKโWORK is REAL array, dimension LWORK- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK.
- On exit, if
LWORKโLWORK is INTEGER- The length of the array
WORK.LWORK >= 1, whenN <= 1; otherwise - If
JOBZ = 'N'andN > 1,LWORKmust be queried. - Then:
- The length of the array
LWORK = MAX(1, dimension) where
dimension = max(stage1,stage2) + (KD+1)*N + 2*N
= N*KD + N*max(KD+1,FACTOPTNB)
+ max(2*KD*KD, KD*NTHREADS)
+ (KD+1)*N + 2*N
where KD is the blocking size of the reduction,
FACTOPTNB is the blocking used by the QR or LQ
algorithm, usually FACTOPTNB=128 is a good choice
NTHREADS is the number of threads used when
openMP compilation is enabled, otherwise =1.
- If
JOBZ = 'V'andN > 1,LWORKmust be queried. Not yet available - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
INFOโINFO is INTEGER= 0: successful exit< 0: if INFO = -i, the i-th argument had an illegal value> 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.
โ๏ธ Author โ๏ธ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ 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
โจ subroutine ssyevd โจ
subroutine ssyevd (character JOBZ, character UPLO, integer N, real,
dimension( lda, * ) A, integer LDA, real, dimension( * ) W, real,
dimension( * ) WORK, integer LWORK, integer, dimension( * ) IWORK,
integer LIWORK, integer INFO)
SSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ๐ฆ
๐ Purpose ๐
OK so bestie, SSYEVD computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. And if you're wanting eigenvectors? It goes and uses a divide and conquer algorithm. Iconic behaviour honestly. ๐
The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none. ๐ซถ
Because of large use of BLAS of level 3, SSYEVD needs N**2 more workspace than SSYEVX. No cap, she's hungry for that WORK array. ๐ญ
๐ธ Parameters ๐ธ
JOBZโJOBZisCHARACTER*1= 'N':Compute eigenvalues only;= 'V':Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1= 'U':Upper triangle ofAis stored;= 'L':Lower triangle ofAis stored.
NโNisINTEGER- The order of the matrix
A.N >= 0.
- The order of the matrix
AโAisREALarray, dimension(LDA, N)- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - On exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the orthonormal eigenvectors of the matrixA. - If
JOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed. ๐ bye bye data bestie.
- On entry, the symmetric matrix
LDAโLDAisINTEGER- The leading dimension of the array
A.LDA >= max(1,N).
- The leading dimension of the array
WโWisREALarray, dimension(N)- If
INFO = 0, the eigenvalues in ascending order. Sorted and serving ๐ โจ
- If
WORKโWORKisREALarray, dimension(LWORK)- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK.
- On exit, if
LWORKโLWORKisINTEGER- The dimension of the array
WORK. - If
N <= 1,LWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LWORKmust be at least2*N+1. - If
JOBZ = 'V'andN > 1,LWORKmust be at least1 + 6*N + 2*N**2. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
- The dimension of the array
IWORKโIWORKisINTEGERarray, dimension(MAX(1,LIWORK))- On exit, if
INFO = 0,IWORK(1)returns the optimalLIWORK.
- On exit, if
LIWORKโLIWORKisINTEGER- The dimension of the array
IWORK. - If
N <= 1,LIWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LIWORKmust be at least1. - If
JOBZ = 'V'andN > 1,LIWORKmust be at least3 + 5*N. - If
LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
- The dimension of the array
INFOโINFOisINTEGER= 0:successful exit ๐< 0:ifINFO = -i, thei-th argument had an illegal value> 0:ifINFO = iandJOBZ = 'N', then the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero;- if
INFO = iandJOBZ = 'V', then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columnsINFO/(N+1)throughmod(INFO,N+1).
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ Contributors: ๐
- Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
- Modified by Francoise Tisseur, University of Tennessee
- Modified description of
INFO. Sven, 16 Feb 05.
โจ subroutine ssyevd_2stage โจ
subroutine ssyevd_2stage (character JOBZ, character UPLO, integer N, real,
dimension( lda, * ) A, integer LDA, real, dimension( * ) W, real,
dimension( * ) WORK, integer LWORK, integer, dimension( * ) IWORK,
integer LIWORK, integer INFO)
SSYEVD_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ๐ฆ
๐ Purpose ๐
SSYEVD_2STAGE computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A using the 2stage technique for the reduction to tridiagonal. If eigenvectors are desired, it uses a divide and conquer algorithm. Two stages?? She's doing the most, and honestly? Ate. ๐
The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none. ๐ซถ
๐ธ Parameters ๐ธ
JOBZโJOBZisCHARACTER*1= 'N':Compute eigenvalues only;= 'V':Compute eigenvalues and eigenvectors. Not available in this release. ๐ญ sorry bestie, it's just not giving yet.
UPLOโUPLOisCHARACTER*1= 'U':Upper triangle ofAis stored;= 'L':Lower triangle ofAis stored.
NโNisINTEGER- The order of the matrix
A.N >= 0.
- The order of the matrix
AโAisREALarray, dimension(LDA, N)- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - On exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the orthonormal eigenvectors of the matrixA. - If
JOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed. ๐
- On entry, the symmetric matrix
LDAโLDAisINTEGER- The leading dimension of the array
A.LDA >= max(1,N).
- The leading dimension of the array
WโWisREALarray, dimension(N)- If
INFO = 0, the eigenvalues in ascending order. ๐
- If
WORKโWORKisREALarray, dimension(LWORK)- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK.
- On exit, if
LWORKโLWORKisINTEGER- The dimension of the array
WORK. - If
N <= 1,LWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LWORKmust be queried:
- The dimension of the array
LWORK = MAX(1, dimension) where
dimension = max(stage1,stage2) + (KD+1)*N + 2*N+1
= N*KD + N*max(KD+1,FACTOPTNB)
+ max(2*KD*KD, KD*NTHREADS)
+ (KD+1)*N + 2*N+1
- where
KDis the blocking size of the reduction, FACTOPTNBis the blocking used by the QR or LQ algorithm, usuallyFACTOPTNB=128is a good choiceNTHREADSis the number of threads used when openMP compilation is enabled, otherwise=1.- If
JOBZ = 'V'andN > 1,LWORKmust be at least1 + 6*N + 2*N**2. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
IWORKโIWORKisINTEGERarray, dimension(MAX(1,LIWORK))- On exit, if
INFO = 0,IWORK(1)returns the optimalLIWORK.
- On exit, if
LIWORKโLIWORKisINTEGER- The dimension of the array
IWORK. - If
N <= 1,LIWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LIWORKmust be at least1. - If
JOBZ = 'V'andN > 1,LIWORKmust be at least3 + 5*N. - If
LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
- The dimension of the array
INFOโINFOisINTEGER= 0:successful exit ๐< 0:ifINFO = -i, thei-th argument had an illegal value> 0:ifINFO = iandJOBZ = 'N', then the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero;- if
INFO = iandJOBZ = 'V', then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columnsINFO/(N+1)throughmod(INFO,N+1).
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Contributors ๐ซถ
okay so the icons behind this whole thing:
- Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
- Modified by Francoise Tisseur, University of Tennessee
- Modified description of INFO. Sven, 16 Feb 05.
periodt. ๐
Further Details โจ
bestie, if you want all the 2stage tea, it's literally all here:
- 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
no cap, these are the receipts. ๐ฅ
subroutine ssyevr ๐
subroutine ssyevr (character JOBZ, character RANGE, character UPLO, integer
N, real, dimension( lda, * ) A, integer LDA, real VL, real VU, integer
IL, integer IU, real ABSTOL, integer M, real, dimension( * ) W, real,
dimension( ldz, * ) Z, integer LDZ, integer, dimension( * ) ISUPPZ,
real, dimension( * ) WORK, integer LWORK, integer, dimension( * ) IWORK,
integer LIWORK, integer INFO)
SSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
Purpose ๐
okay so SSYEVR is literally that girl. she computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. you can pick which eigenvalues and eigenvectors you want by specifying either a range of values or a range of indices for the desired eigenvalues. it's giving main character energy, fr fr.
SSYEVR first reduces the matrix A to tridiagonal form T with a call to SSYTRD. Then, whenever possible, SSYEVR calls SSTEMR to compute the eigenspectrum using Relatively Robust Representations. SSTEMR computes eigenvalues by the dqds algorithm, while orthogonal eigenvectors are computed from various 'good' L D L^T representations (also known as Relatively Robust Representations). Gram-Schmidt orthogonalization is avoided as far as possible. More specifically, the various steps of the algorithm are as follows.
For each unreduced block (submatrix) of T,
- (a) Compute
T - sigma I = L D L^T, so thatLandDdefine all the wanted eigenvalues to high relative accuracy. This means that small relative changes in the entries ofDandLcause only small relative changes in the eigenvalues and eigenvectors. The standard (unfactored) representation of the tridiagonal matrixTdoes not have this property in general. - (b) Compute the eigenvalues to suitable accuracy. If the eigenvectors are desired, the algorithm attains full accuracy of the computed eigenvalues only right before the corresponding vectors have to be computed, see steps c) and d).
- (c) For each cluster of close eigenvalues, select a new shift close to the cluster, find a new factorization, and refine the shifted eigenvalues to suitable accuracy.
- (d) For each eigenvalue with a large enough relative separation compute the corresponding eigenvector by forming a rank revealing twisted factorization. Go back to (c) for any clusters that remain.
The desired accuracy of the output can be specified by the input parameter ABSTOL.
For more details, see SSTEMR's documentation and:
- Inderjit S. Dhillon and Beresford N. Parlett: 'Multiple representations to compute orthogonal eigenvectors of symmetric tridiagonal matrices,' Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
- Inderjit Dhillon and Beresford Parlett: 'Orthogonal Eigenvectors and Relative Gaps,' SIAM Journal on Matrix Analysis and Applications, Vol. 25, 2004. Also LAPACK Working Note 154.
- Inderjit Dhillon: 'A new O(n^2) algorithm for the symmetric tridiagonal eigenvalue/eigenvector problem', Computer Science Division Technical Report No. UCB/CSD-97-971, UC Berkeley, May 1997.
Note 1 :SSYEVRcallsSSTEMRwhen the full spectrum is requested on machines which conform to the ieee-754 floating point standard.SSYEVRcallsSSTEBZandSSTEINon non-ieee machines and when partial spectrum requests are made.
Normal execution of SSTEMR may create NaNs and infinities and hence may abort due to a floating point exception in environments which do not handle NaNs and infinities in the ieee standard default manner.
Parameters ๐
okay bestie, here's the full rundown of every parameter. don't skip, iykyk.
JOBZโJOBZisCHARACTER*1'N': Compute eigenvalues only;'V': Compute eigenvalues and eigenvectors.
RANGEโRANGEisCHARACTER*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. ForRANGE = 'V'or'I'andIU - IL < N - 1,SSTEBZandSSTEINare called
UPLOโUPLOisCHARACTER*1'U': Upper triangle ofAis stored;'L': Lower triangle ofAis stored.
NโNisINTEGERThe order of the matrixA.N >= 0.AโAisREALarray, dimension(LDA, N)On entry, the symmetric matrixA. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. On exit, the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed.LDAโLDAisINTEGERThe leading dimension of the arrayA.LDA >= max(1,N).VLโVLisREALIfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUโVUisREALIfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILโILisINTEGERIfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโIUisINTEGERIfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโABSTOLisREALThe 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 A to tridiagonal form.
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3.
If high relative accuracy is important, set ABSTOL to SLAMCH( 'Safe minimum' ). Doing so will guarantee that eigenvalues are computed to high relative accuracy when possible in future releases. The current code does not make any guarantees about high relative accuracy, but future releases will. See J. Barlow and J. Demmel, 'Computing Accurate Eigensystems of Scaled Diagonally Dominant Matrices', LAPACK Working Note #7, for a discussion of which matrices define their eigenvalues to high relative accuracy.
MโMisINTEGERThe total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.WโWisREALarray, dimension(N)The firstMelements contain the selected eigenvalues in ascending order.ZโZisREALarray, dimension(LDZ, max(1,M))IfJOBZ = '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). IfJOBZ = '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. SupplyingNcolumns is always safe.LDZโLDZisINTEGERThe leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).ISUPPZโISUPPZโ INTEGER array, dimension( 2*max(1,M) ). It's the support of the eigenvectors inZ, aka the indices where the nonzero elements ofZactually live. The i-th eigenvector is nonzero only in elementsISUPPZ( 2*i-1 )throughISUPPZ( 2*i ). This one is an output ofSSTEMR(tridiagonal matrix). The support of the eigenvectors ofAis typically1:Nbecause of the orthogonal transformations applied bySORMTR. ๐ซ Implemented only forRANGE = 'A'or'I'andIU - IL = N - 1.WORKโ REAL array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. โจLWORKโ INTEGER. The dimension of the arrayWORK.LWORK >= max(1,26*N). For optimal efficiency,LWORK >= (NB+6)*N, whereNBis the max of the blocksize forSSYTRDandSORMTRreturned byILAENV. ๐งฎ IfLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA. (sneaky little peek, no computation ๐ )IWORKโ INTEGER array, dimension(MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimalLWORK. ๐ธLIWORKโ INTEGER. The dimension of the arrayIWORK.LIWORK >= max(1,10*N). ๐ IfLIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.INFOโ INTEGER. The vibe check on the whole operation: ๐= 0: successful exit ๐< 0: ifINFO = -i, the i-th argument had an illegal value ๐ฌ> 0: Internal error ๐
๐ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
๐ Contributors:
Inderjit Dhillon, IBM Almaden, USA Osni Marques, LBNL/NERSC, USA Ken Stanley, Computer Science Division, University of California at Berkeley, USA Jason Riedy, Computer Science Division, University of California at Berkeley, USA
โจ ssyevr_2stage โจ
subroutine ssyevr_2stage (character JOBZ, character RANGE, character UPLO,
integer N, real, dimension( lda, * ) A, integer LDA, real VL, real VU,
integer IL, integer IU, real ABSTOL, integer M, real, dimension( * ) W,
real, dimension( ldz, * ) Z, integer LDZ, integer, dimension( * )
ISUPPZ, real, dimension( * ) WORK, integer LWORK, integer, dimension( *
) IWORK, integer LIWORK, integer INFO)
SSYEVR_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ๐
๐ Purpose:
SSYEVR_2STAGE computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix A using the 2stage technique for the reduction to tridiagonal. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. ๐ฏ
SSYEVR_2STAGE first reduces the matrix A to tridiagonal form T with a call to SSYTRD. Then, whenever possible, SSYEVR_2STAGE calls SSTEMR to compute the eigenspectrum using Relatively Robust Representations. SSTEMR computes eigenvalues by the dqds algorithm, while orthogonal eigenvectors are computed from various 'good' L D L^T representations (also known as Relatively Robust Representations). Gram-Schmidt orthogonalization is avoided as far as possible. More specifically, the various steps of the algorithm are as follows. ๐ง
For each unreduced block (submatrix) of T,
- Compute
T - sigma I = L D L^T, so thatLandDdefine all the wanted eigenvalues to high relative accuracy. This means that small relative changes in the entries ofDandLcause only small relative changes in the eigenvalues and eigenvectors. The standard (unfactored) representation of the tridiagonal matrixTdoes not have this property in general. - Compute the eigenvalues to suitable accuracy. If the eigenvectors are desired, the algorithm attains full accuracy of the computed eigenvalues only right before the corresponding vectors have to be computed, see steps c) and d).
- For each cluster of close eigenvalues, select a new shift close to the cluster, find a new factorization, and refine the shifted eigenvalues to suitable accuracy.
- For each eigenvalue with a large enough relative separation compute the corresponding eigenvector by forming a rank revealing twisted factorization. Go back to (c) for any clusters that remain.
The desired accuracy of the output can be specified by the input parameter ABSTOL. ๐ฏ
For more details, see SSTEMR's documentation and:
- Inderjit S. Dhillon and Beresford N. Parlett: 'Multiple representations to compute orthogonal eigenvectors of symmetric tridiagonal matrices,' Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
- Inderjit Dhillon and Beresford Parlett: 'Orthogonal Eigenvectors and Relative Gaps,' SIAM Journal on Matrix Analysis and Applications, Vol. 25, 2004. Also LAPACK Working Note 154.
- Inderjit Dhillon: 'A new O(n^2) algorithm for the symmetric tridiagonal eigenvalue/eigenvector problem', Computer Science Division Technical Report No. UCB/CSD-97-971, UC Berkeley, May 1997.
Note 1 :SSYEVR_2STAGEcallsSSTEMRwhen the full spectrum is requested on machines which conform to the ieee-754 floating point standard.SSYEVR_2STAGEcallsSSTEBZandSSTEINon non-ieee machines and when partial spectrum requests are made.
Heads up bestie ๐ญ Normal execution of SSTEMR may create NaNs and infinities and hence may abort due to a floating point exception in environments which do not handle NaNs and infinities in the ieee standard default manner.
๐ Parameters
JOBZโ CHARACTER*1. Pick your destiny: โจ= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors. Not available in this release. ๐ญ
RANGEโ CHARACTER*1. Which eigenvalues we hunting for? ๐= '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.- For
RANGE = 'V'or'I'andIU - IL < N - 1,SSTEBZandSSTEINare called
UPLOโ CHARACTER*1. Which triangle are we trusting today? ๐= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
Nโ INTEGER. The order of the matrixA.N >= 0.Aโ REAL array, dimension(LDA, N). On entry, the symmetric matrixA. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. ๐ On exit, the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed. ๐ no cap, she's gone.LDAโ INTEGER. The leading dimension of the arrayA.LDA >= max(1,N).VLโ REAL. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUโ REAL. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILโ INTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโ INTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโ 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 A to tridiagonal form.
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3.
If high relative accuracy is important, set ABSTOL to SLAMCH( 'Safe minimum' ). Doing so will guarantee that eigenvalues are computed to high relative accuracy when possible in future releases. The current code does not make any guarantees about high relative accuracy, but future releases will. See J. Barlow and J. Demmel, 'Computing Accurate Eigensystems of Scaled Diagonally Dominant Matrices', LAPACK Working Note #7, for a discussion of which matrices define their eigenvalues to high relative accuracy. ๐
Mโ INTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.Wโ REAL array, dimension(N). The firstMelements contain the selected eigenvalues in ascending order. โฌ๏ธโจZZโ REAL array, dimension(LDZ, max(1,M)). IfJOBZ = 'V', then whenINFO = 0, the firstMcolumns ofZhold the orthonormal eigenvectors of the matrixAthat go with the eigenvalues you selected โ thei-th column ofZcarries the eigenvector paired withW(i). ๐ IfJOBZ = 'N', thenZis not referenced at all, so you can genuinely just not think about it.
โ ๏ธ Note: you have to make sure 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. SupplyingNcolumns is always safe. ๐
LDZโ INTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V', thenLDZ >= max(1,N). Periodt.ISUPPZโ INTEGER array, dimension( 2*max(1,M) ). It's the support of the eigenvectors inZ, i.e. the indices that mark the nonzero elements inZ. Thei-th eigenvector is nonzero only in elementsISUPPZ( 2*i-1 )throughISUPPZ( 2*i ). This is an output ofSSTEMR(tridiagonal matrix). The support of the eigenvectors ofAis typically1:Nbecause of the orthogonal transformations applied bySORMTR. ๐ฆ Implemented only forRANGE = 'A'or'I'andIU - IL = N - 1.WORKโ REAL array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. โจLWORKโ INTEGER. The dimension of the arrayWORK.
If JOBZ = 'N' and N > 1, LWORK must be queried:
LWORK = MAX(1, 26*N, dimension) where
dimension = max(stage1,stage2) + (KD+1)*N + 5*N
= N*KD + N*max(KD+1,FACTOPTNB)
+ max(2*KD*KD, KD*NTHREADS)
+ (KD+1)*N + 5*N
where KD is the blocking size of the reduction,
FACTOPTNB is the blocking used by the QR or LQ
algorithm, usually FACTOPTNB=128 is a good choice
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 ๐
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
IWORKโ INTEGER array, dimension(MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimalLWORK.LIWORKโ INTEGER. The dimension of the arrayIWORK.LIWORK >= max(1,10*N).
If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the IWORK array, returns this value as the first entry of the IWORK array, and no error message related to LIWORK is issued by XERBLA.
INFOโ INTEGER:= 0: successful exit ๐< 0: ifINFO = -i, thei-th argument had an illegal value ๐ญ> 0: Internal error ๐
๐ซถ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ Contributors:
- Inderjit Dhillon, IBM Almaden, USA
- Osni Marques, LBNL/NERSC, USA
- Ken Stanley, Computer Science Division, University of California at Berkeley, USA
- Jason Riedy, Computer Science Division, University of California at Berkeley, USA
๐ Further Details:
All the deets about the 2stage techniques live in these, bestie:
- 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
๐ subroutine ssyevx
subroutine ssyevx (character JOBZ, character RANGE, character UPLO, integer
N, real, dimension( lda, * ) A, integer LDA, real VL, real VU, integer
IL, integer IU, real ABSTOL, integer M, real, dimension( * ) W, real,
dimension( ldz, * ) Z, integer LDZ, real, dimension( * ) WORK, integer
LWORK, integer, dimension( * ) IWORK, integer, dimension( * ) IFAIL,
integer INFO)
SSYEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ๐ฆ
๐ฏ Purpose:
SSYEVX computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. Like, you get to pick. Iconic. ๐
๐ Parameters
JOBZโ CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโ 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โ CHARACTER*1= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
Nโ INTEGER. The order of the matrixA.N >= 0.Aโ REAL array, dimension(LDA, N). On entry, the symmetric matrixA. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA.
๐ญ On exit, the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed. She's gone. Say bye.
LDAโ INTEGER. The leading dimension of the arrayA.LDA >= max(1,N).VLโ REAL. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUโ REAL. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILโ INTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโ INTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโ 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 A 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'). ๐
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3.
Mโ INTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.Wโ REAL array, dimension(N). On normal exit, the firstMelements contain the selected eigenvalues in ascending order. โญZโ REAL array, dimension(LDZ, max(1,M)). IfJOBZ = '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 Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. ๐
If JOBZ = 'N', then Z is 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.
LDZLDZisINTEGERโ the leading dimension of the arrayZ. So like,LDZ >= 1, and ifJOBZ = 'V'thenLDZ >= max(1,N). That's the rule bestie, no negotiating ๐WORKisREAL array, dimension (MAX(1,LWORK))โ on exit, ifINFO = 0, thenWORK(1)returns the optimalLWORK. She's got receipts โจLWORKisINTEGERโ the length of the arrayWORK.LWORK >= 1, whenN <= 1; otherwise8*N. And for optimal efficiency,LWORK >= (NB+3)*N, whereNBis the max of the blocksize forSSYTRDandSORMTRreturned byILAENV. IfLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. ๐ซถIWORKisINTEGER array, dimension (5*N)IFAILisINTEGER array, dimension (N)โ ifJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero. IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge. IfJOBZ = 'N', thenIFAILis not referenced. (so rude of it tbh ๐ญ)INFOisINTEGER= 0: successful exit โจ< 0: ifINFO = -i, the i-th argument had an illegal value ๐> 0: ifINFO = i, then i eigenvectors failed to converge. Their indices are stored in arrayIFAIL.
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ฆ subroutine ssyevx_2stage
subroutine ssyevx_2stage (character JOBZ, character RANGE, character UPLO,
integer N, real, dimension( lda, * ) A, integer LDA, real VL, real VU,
integer IL, integer IU, real ABSTOL, integer M, real, dimension( * ) W,
real, dimension( ldz, * ) Z, integer LDZ, real, dimension( * ) WORK,
integer LWORK, integer, dimension( * ) IWORK, integer, dimension( * )
IFAIL, integer INFO)
SSYEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ๐ธ
๐ Purpose
SSYEVX_2STAGE computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix A using the 2stage technique for the reduction to tridiagonal. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. it's giving main character energy, fr fr ๐
๐ Parameters
JOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors. Not available in this release. ๐ญ
RANGEisCHARACTER*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.
UPLOisCHARACTER*1= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NisINTEGERโ the order of the matrixA.N >= 0.AisREAL array, dimension (LDA, N)โ on entry, the symmetric matrixA. IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leading N-by-N lower triangular part ofAcontains the lower triangular part of the matrixA. On exit, the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed. ๐ she's gone bestieLDAisINTEGERโ the leading dimension of the arrayA.LDA >= max(1,N).VLisREALโ ifRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUisREALโ ifRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILisINTEGERโ ifRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUisINTEGERโ ifRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLisREALโ 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 A 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').
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3. ๐
MisINTEGERโ the total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.WisREAL array, dimension (N)โ on normal exit, the firstMelements contain the selected eigenvalues in ascending order. โจ so tidy of themZisREAL array, dimension (LDZ, max(1,M))โ ifJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with the i-th column ofZholding the eigenvector associated withW(i). If an eigenvector fails to converge, then that column ofZcontains the latest approximation to the eigenvector, and the index of the eigenvector is returned inIFAIL. IfJOBZ = '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. ๐ plan ahead bestieLDZisINTEGERโ the leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKisREAL array, dimension (MAX(1,LWORK))โ on exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKisINTEGERโ the length of the arrayWORK.LWORK >= 1, whenN <= 1; otherwise: IfJOBZ = 'N'andN > 1,LWORKmust be queried.
LWORK = MAX(1, 8*N, dimension) where
dimension = max(stage1,stage2) + (KD+1)*N + 3*N
= N*KD + N*max(KD+1,FACTOPTNB)
+ max(2*KD*KD, KD*NTHREADS)
+ (KD+1)*N + 3*N
where KD is the blocking size of the reduction,
FACTOPTNB is the blocking used by the QR or LQ
algorithm, usually FACTOPTNB=128 is a good choice
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 ๐ญ
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
IWORKisINTEGER array, dimension (5*N)IFAILisINTEGER array, dimension (N)โ ifJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero. IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge. IfJOBZ = 'N', thenIFAILis not referenced.INFOisINTEGER= 0: successful exit โจ< 0: ifINFO = -i, the i-th argument had an illegal value ๐> 0: ifINFO = i, then i eigenvectors failed to converge. Their indices are stored in arrayIFAIL.
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ธ 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
like yes bestie, cite your sources, that's academic main character behavior ๐๐โจ
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
subroutine ssygv ๐
subroutine ssygv (integer ITYPE, character JOBZ, character UPLO, integer N,
real, dimension( lda, * ) A, integer LDA, real, dimension( ldb, * ) B,
integer LDB, real, dimension( * ) W, real, dimension( * ) WORK, integer
LWORK, integer INFO)
SSYGV โ bestie, this is THE glow-up routine for generalized symmetric-definite eigenproblems. โจ
Purpose ๐ฆ
SSYGV computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
Here A and B are assumed to be symmetric and B is also positive definite. ๐
Parameters ๐
ITYPEโITYPEisINTEGER. It specifies the problem type to be solved, and honestly it's giving "pick your fighter" energy:= 1:A*x = (lambda)*B*x= 2:A*B*x = (lambda)*x= 3:B*A*x = (lambda)*x
JOBZโJOBZisCHARACTER*1:= 'N': compute eigenvalues only;= 'V': compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1:= 'U': upper triangles ofAandBare stored;= 'L': lower triangles ofAandBare stored.
NโNisINTEGER. The order of the matricesAandB.N >= 0.AโAisREALarray, dimension(LDA, N).- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - On exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the matrixZof eigenvectors. The eigenvectors are normalized as follows:- if
ITYPE = 1or2,Z**T*B*Z = I; - if
ITYPE = 3,Z**T*inv(B)*Z = I.
- if
- If
JOBZ = 'N', then on exit the upper triangle (ifUPLO='U') or the lower triangle (ifUPLO='L') ofA, including the diagonal, is destroyed. ๐ญ Yeah. Gone. Don't come for her later.
- On entry, the symmetric matrix
LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BโBisREALarray, dimension(LDB, N).- On entry, the symmetric positive definite matrix
B. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofBcontains the upper triangular part of the matrixB. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofBcontains the lower triangular part of the matrixB. - On exit, if
INFO <= N, the part ofBcontaining the matrix is overwritten by the triangular factorUorLfrom the Cholesky factorizationB = U**T*UorB = L*L**T.
- On entry, the symmetric positive definite matrix
LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).WโWisREALarray, dimension(N). IfINFO = 0, the eigenvalues in ascending order. โญWORKโWORKisREALarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. ๐LWORKโLWORKisINTEGER. The length of the arrayWORK.LWORK >= max(1,3*N-1). For optimal efficiency,LWORK >= (NB+2)*N, whereNBis the blocksize forSSYTRDreturned byILAENV.- If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. ๐ซถ
- If
INFOโINFOisINTEGER:= 0: successful exit ๐< 0: ifINFO = -i, thei-th argument had an illegal value> 0:SPOTRForSSYEVreturned an error code:<= N: ifINFO = i,SSYEVfailed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero;> N: ifINFO = N + i, for1 <= i <= N, then the leading minor of orderiofBis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. ๐
Author ๐ธ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
subroutine ssygv_2stage ๐ฅ
subroutine ssygv_2stage (integer ITYPE, character JOBZ, character UPLO,
integer N, real, dimension( lda, * ) A, integer LDA, real, dimension(
ldb, * ) B, integer LDB, real, dimension( * ) W, real, dimension( * )
WORK, integer LWORK, integer INFO)
SSYGV_2STAGE โ same vibe, but โจtwo-stageโจ, and she's fast on modern hardware. Periodt.
Purpose ๐ฆ
SSYGV_2STAGE computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
Here A and B are assumed to be symmetric and B is also positive definite.
This routine use the 2stage technique for the reduction to tridiagonal which showed higher performance on recent architecture and for large sizes N>2000. ๐ฅ
Parameters ๐
ITYPEโITYPEisINTEGER. It specifies the problem type to be solved:= 1:A*x = (lambda)*B*x= 2:A*B*x = (lambda)*x= 3:B*A*x = (lambda)*x
JOBZโJOBZisCHARACTER*1:= 'N': compute eigenvalues only;= 'V': compute eigenvalues and eigenvectors. Not available in this release. ๐ซ
UPLOโUPLOisCHARACTER*1:= 'U': upper triangles ofAandBare stored;= 'L': lower triangles ofAandBare stored.
NโNisINTEGER. The order of the matricesAandB.N >= 0.AโAisREALarray, dimension(LDA, N).- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - On exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the matrixZof eigenvectors. The eigenvectors are normalized as follows:- if
ITYPE = 1or2,Z**T*B*Z = I; - if
ITYPE = 3,Z**T*inv(B)*Z = I.
- if
- If
JOBZ = 'N', then on exit the upper triangle (ifUPLO='U') or the lower triangle (ifUPLO='L') ofA, including the diagonal, is destroyed. ๐ญ Same energy as before, bestie.
- On entry, the symmetric matrix
LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BโBisREALarray, dimension(LDB, N).- On entry, the symmetric positive definite matrix
B. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofBcontains the upper triangular part of the matrixB. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofBcontains the lower triangular part of the matrixB. - On exit, if
INFO <= N, the part ofBcontaining the matrix is overwritten by the triangular factorUorLfrom the Cholesky factorizationB = U**T*UorB = L*L**T.
- On entry, the symmetric positive definite matrix
LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).WโWisREALarray, dimension(N). IfINFO = 0, the eigenvalues in ascending order. โญWORKโWORKisREALarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. ๐LWORKโLWORKisINTEGER. The length of the arrayWORK.LWORK >= 1, whenN <= 1; otherwise:
If JOBZ = 'N' and N > 1, LWORK must be queried.
LWORK = MAX(1, dimension) where
dimension = max(stage1,stage2) + (KD+1)*N + 2*N
= N*KD + N*max(KD+1,FACTOPTNB)
+ max(2*KD*KD, KD*NTHREADS)
+ (KD+1)*N + 2*N
where KD is the blocking size of the reduction,
FACTOPTNB is the blocking used by the QR or LQ
algorithm, usually FACTOPTNB=128 is a good choice
NTHREADS is the number of threads used when
openMP compilation is enabled, otherwise =1.
- If
JOBZ = 'V'andN > 1,LWORKmust be queried. Not yet available. ๐ - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. ๐ซถ
INFOโINFOisINTEGER:= 0: successful exit ๐< 0: ifINFO = -i, thei-th argument had an illegal value> 0:SPOTRForSSYEVreturned an error code:<= N: ifINFO = i,SSYEVfailed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero;> N: ifINFO = N + i, for1 <= i <= N, then the leading minor of orderiofBis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. ๐
Author ๐ธ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
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
๐ subroutine ssygvd
subroutine ssygvd (integer ITYPE, character JOBZ, character UPLO, integer N,
real, dimension( lda, * ) A, integer LDA, real, dimension( ldb, * ) B,
integer LDB, real, dimension( * ) W, real, dimension( * ) WORK, integer
LWORK, integer, dimension( * ) IWORK, integer LIWORK, integer INFO)
SSYGVD
โจ Purpose
okay bestie, so SSYGVD computes all the eigenvalues โ and if you want them, the eigenvectors too โ of a real generalized symmetric-definite eigenproblem. Like, one of these three flavors:
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
Here A and B are assumed to be symmetric and B is also positive definite (non-negotiable, she's gotta be PD ๐
). If you want eigenvectors, it uses a divide and conquer algorithm. Iconic behavior, honestly.
The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none. (so like, theoretically a vibe check could fail, but nobody's ever seen it happen ๐)
๐ธ Parameters
ITYPEโITYPEisINTEGER. Specifies the problem type to be solved:= 1: A*x = (lambda)*B*x= 2: A*B*x = (lambda)*x= 3: B*A*x = (lambda)*x
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1= 'U': Upper triangles ofAandBare stored;= 'L': Lower triangles ofAandBare stored.
NโNisINTEGER. The order of the matricesAandB.N >= 0.AโAisREALarray, dimension(LDA, N). On entry, the symmetric matrixA. IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leading N-by-N lower triangular part ofAcontains the lower triangular part of the matrixA.
On exit, if JOBZ = 'V', then if INFO = 0, A contains the matrix Z of eigenvectors. The eigenvectors are normalized as follows:
- if
ITYPE = 1or2,Z**T*B*Z = I; - if
ITYPE = 3,Z**T*inv(B)*Z = I.
If JOBZ = 'N', then on exit the upper triangle (if UPLO='U') or the lower triangle (if UPLO='L') of A, including the diagonal, is destroyed. ๐ญ she's gone, girl.
LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BโBisREALarray, dimension(LDB, N). On entry, the symmetric matrixB. IfUPLO = 'U', the leading N-by-N upper triangular part ofBcontains the upper triangular part of the matrixB. IfUPLO = 'L', the leading N-by-N lower triangular part ofBcontains the lower triangular part of the matrixB.
On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T.
LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).WโWisREALarray, dimension(N). IfINFO = 0, the eigenvalues in ascending order. (yes bestie, sorted, we love an organized queen โจ)WORKโWORKisREALarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKโLWORKisINTEGER. The dimension of the arrayWORK.- If
N <= 1,LWORK >= 1. - If
JOBZ = 'N'andN > 1,LWORK >= 2*N+1. - If
JOBZ = 'V'andN > 1,LWORK >= 1 + 6*N + 2*N**2.
- If
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.
IWORKโIWORKisINTEGERarray, dimension(MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimalLIWORK.LIWORKโLIWORKisINTEGER. The dimension of the arrayIWORK.- If
N <= 1,LIWORK >= 1. - If
JOBZ = 'N'andN > 1,LIWORK >= 1. - If
JOBZ = 'V'andN > 1,LIWORK >= 3 + 5*N.
- If
If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.
INFOโINFOisINTEGER= 0: successful exit ๐< 0: ifINFO = -i, the i-th argument had an illegal value> 0:SPOTRForSSYEVDreturned an error code:<= N: ifINFO = iandJOBZ = 'N', then the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero; ifINFO = iandJOBZ = 'V', then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columnsINFO/(N+1)throughmod(INFO,N+1);> N: ifINFO = N + i, for1 <= i <= N, then the leading minor of orderiofBis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. ๐
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ฆ Further Details:
Modified so that no backsubstitution is performed if SSYEVD fails to converge (NEIG in old code could be greater than N causing out of bounds reference to A - reported by Ralf Meyer). Also corrected the description of INFO and the test on ITYPE. Sven, 16 Feb 05.
๐ Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
๐ง subroutine ssygvx
subroutine ssygvx (integer ITYPE, character JOBZ, character RANGE, character
UPLO, integer N, real, dimension( lda, * ) A, integer LDA, real,
dimension( ldb, * ) B, integer LDB, real VL, real VU, integer IL,
integer IU, real ABSTOL, integer M, real, dimension( * ) W, real,
dimension( ldz, * ) Z, integer LDZ, real, dimension( * ) WORK, integer
LWORK, integer, dimension( * ) IWORK, integer, dimension( * ) IFAIL,
integer INFO)
SSYGVX
โจ Purpose
SSYGVX computes selected eigenvalues, and optionally, eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
Here A and B are assumed to be symmetric and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. like, you get to pick your faves, no cap ๐
๐ธ Parameters
ITYPEโITYPEisINTEGER. Specifies the problem type to be solved:= 1: A*x = (lambda)*B*x= 2: A*B*x = (lambda)*x= 3: B*A*x = (lambda)*x
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโRANGEisCHARACTER*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โUPLOisCHARACTER*1= 'U': Upper triangle ofAandBare stored;= 'L': Lower triangle ofAandBare stored.
NโNisINTEGER. The order of the matrix pencil(A,B).N >= 0.AโAisREALarray, dimension(LDA, N). On entry, the symmetric matrixA. IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leading N-by-N lower triangular part ofAcontains the lower triangular part of the matrixA.
On exit, the lower triangle (if UPLO='L') or the upper triangle (if UPLO='U') of A, including the diagonal, is destroyed. rest in peace bestie ๐ชฆ
LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BโBisREALarray, dimension(LDB, N). On entry, the symmetric matrixB. IfUPLO = 'U', the leading N-by-N upper triangular part ofBcontains the upper triangular part of the matrixB. IfUPLO = 'L', the leading N-by-N lower triangular part ofBcontains the lower triangular part of the matrixB.LDBโINTEGER. The leading dimension of the arrayB. Gotta be at leastLDB >= max(1,N), no skimping bestie.VLโREAL. IfRANGE='V', this is the lower bound of the interval we're hunting eigenvalues in, okay? Constraint:VL < VU. Not referenced ifRANGE = 'A'or'I'โ so if you're not doing interval mode, she simply doesn't care.VUโREAL. IfRANGE='V', this is the upper bound of the interval we're searching for eigenvalues in. AlsoVL < VU. And again, not referenced ifRANGE = 'A'or'I'.ILโINTEGER. IfRANGE='I', this is the index of the smallest eigenvalue you want back. Rules:1 <= IL <= IU <= N, ifN > 0; andIL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'. ๐IUโINTEGER. IfRANGE='I', this is the index of the largest eigenvalue you want back. Same deal:1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโREAL. The absolute error tolerance for the eigenvalues, aka the vibe threshold for "close enough, we're calling it." An approximate eigenvalue is accepted as converged when it's determined to lie in an interval[a,b]whose width is 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| gets used in its place instead, where |T| is the 1-norm of the tridiagonal matrix you get by reducing C to tridiagonal form โ and C is the symmetric matrix of the standard symmetric problem that the generalized problem gets transformed into. (iykyk ๐)
Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. So like, don't just leave it at zero thinking you're being efficient. If this routine comes back with INFO>0, meaning some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH('S').
MโINTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A', thenM = N, and ifRANGE = 'I', thenM = IU-IL+1. Math checks out, bestie. โจWโREAL array, dimension(N). On normal exit, the firstMelements contain the selected eigenvalues in ascending order. Sorted, organized, thriving. ๐ZโREAL array, dimension(LDZ, max(1,M)). IfJOBZ = 'N', thenZis not referenced (she's off duty). IfJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with the i-th column ofZholding the eigenvector associated withW(i).
The eigenvectors are normalized as follows:
- if
ITYPE = 1or2,Z**T*B*Z = I; - if
ITYPE = 3,Z**T*inv(B)*Z = I.
If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. Note: the user must ensure that at least max(1,M) columns are supplied in the array Z; if RANGE = 'V', the exact value of M is not known in advance and an upper bound must be used. No cap, plan ahead. ๐
LDZโINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V', thenLDZ >= max(1,N).WORKโREAL array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0, thenWORK(1)returns the optimalLWORK. She's telling you how much room she actually wanted. ๐ซถLWORKโINTEGER. The length of the arrayWORK.LWORK >= max(1,8*N). For optimal efficiency,LWORK >= (NB+3)*N, whereNBis the blocksize forSSYTRDreturned byILAENV.
If LWORK = -1, then a workspace query is assumed โ the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. It's giving "asking permission first" energy. ๐
IWORKโINTEGER array, dimension(5*N).IFAILโINTEGER array, dimension(N). IfJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero. IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge. IfJOBZ = 'N', thenIFAILis not referenced.INFOโINTEGER. The receipts:= 0: successful exit ๐< 0: ifINFO = -i, the i-th argument had an illegal value> 0:SPOTRForSSYEVXreturned an error code:<= N: ifINFO = i,SSYEVXfailed to converge;ieigenvectors failed to converge. Their indices are stored in arrayIFAIL.> N: ifINFO = N + i, for1 <= i <= N, then the leading minor of orderiofBis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. ๐
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ Contributors ๐
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
And that's the whole page, bestie โ you made it to the end, main character energy fr fr. ๐ This page is LAPACK's realSYeigen(3), version 3.11.0, dated Sun Nov 27 2022, and it was generated automatically by Doxygen for LAPACK straight from the source code. Iconic. Slay. Periodt. ๐โจ๐
๐ฆ where this page comes from
- debian bookworm: liblapack-doc 3.11.0-2 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms