1SSYGVD(1) LAPACK driver routine (version 3.2) SSYGVD(1)
2
3
4
6 SSYGVD - computes all the eigenvalues, and optionally, the eigenvectors
7 of a real generalized symmetric-definite eigenproblem, of the form
8 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x
9
11 SUBROUTINE SSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
12 LWORK, IWORK, LIWORK, INFO )
13
14 CHARACTER JOBZ, UPLO
15
16 INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
17
18 INTEGER IWORK( * )
19
20 REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
21
23 SSYGVD computes all the eigenvalues, and optionally, the eigenvectors
24 of a real generalized symmetric-definite eigenproblem, of the form
25 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B
26 are assumed to be symmetric and B is also positive definite. If eigen‐
27 vectors are desired, it uses a divide and conquer algorithm. The
28 divide and conquer algorithm makes very mild assumptions about floating
29 point arithmetic. It will work on machines with a guard digit in
30 add/subtract, or on those binary machines without guard digits which
31 subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could
32 conceivably fail on hexadecimal or decimal machines without guard dig‐
33 its, but we know of none.
34
36 ITYPE (input) INTEGER
37 Specifies the problem type to be solved:
38 = 1: A*x = (lambda)*B*x
39 = 2: A*B*x = (lambda)*x
40 = 3: B*A*x = (lambda)*x
41
42 JOBZ (input) CHARACTER*1
43 = 'N': Compute eigenvalues only;
44 = 'V': Compute eigenvalues and eigenvectors.
45
46 UPLO (input) CHARACTER*1
47 = 'U': Upper triangles of A and B are stored;
48 = 'L': Lower triangles of A and B are stored.
49
50 N (input) INTEGER
51 The order of the matrices A and B. N >= 0.
52
53 A (input/output) REAL array, dimension (LDA, N)
54 On entry, the symmetric matrix A. If UPLO = 'U', the leading
55 N-by-N upper triangular part of A contains the upper triangular
56 part of the matrix A. If UPLO = 'L', the leading N-by-N lower
57 triangular part of A contains the lower triangular part of the
58 matrix A. On exit, if JOBZ = 'V', then if INFO = 0, A contains
59 the matrix Z of eigenvectors. The eigenvectors are normalized
60 as follows: if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3,
61 Z**T*inv(B)*Z = I. If JOBZ = 'N', then on exit the upper tri‐
62 angle (if UPLO='U') or the lower triangle (if UPLO='L') of A,
63 including the diagonal, is destroyed.
64
65 LDA (input) INTEGER
66 The leading dimension of the array A. LDA >= max(1,N).
67
68 B (input/output) REAL array, dimension (LDB, N)
69 On entry, the symmetric matrix B. If UPLO = 'U', the leading
70 N-by-N upper triangular part of B contains the upper triangular
71 part of the matrix B. If UPLO = 'L', the leading N-by-N lower
72 triangular part of B contains the lower triangular part of the
73 matrix B. On exit, if INFO <= N, the part of B containing the
74 matrix is overwritten by the triangular factor U or L from the
75 Cholesky factorization B = U**T*U or B = L*L**T.
76
77 LDB (input) INTEGER
78 The leading dimension of the array B. LDB >= max(1,N).
79
80 W (output) REAL array, dimension (N)
81 If INFO = 0, the eigenvalues in ascending order.
82
83 WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
84 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
85
86 LWORK (input) INTEGER
87 The dimension of the array WORK. If N <= 1,
88 LWORK >= 1. If JOBZ = 'N' and N > 1, LWORK >= 2*N+1. If JOBZ
89 = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2. If LWORK = -1,
90 then a workspace query is assumed; the routine only calculates
91 the optimal sizes of the WORK and IWORK arrays, returns these
92 values as the first entries of the WORK and IWORK arrays, and
93 no error message related to LWORK or LIWORK is issued by
94 XERBLA.
95
96 IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
97 On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
98
99 LIWORK (input) INTEGER
100 The dimension of the array IWORK. If N <= 1,
101 LIWORK >= 1. If JOBZ = 'N' and N > 1, LIWORK >= 1. If JOBZ
102 = 'V' and N > 1, LIWORK >= 3 + 5*N. If LIWORK = -1, then a
103 workspace query is assumed; the routine only calculates the
104 optimal sizes of the WORK and IWORK arrays, returns these val‐
105 ues as the first entries of the WORK and IWORK arrays, and no
106 error message related to LWORK or LIWORK is issued by XERBLA.
107
108 INFO (output) INTEGER
109 = 0: successful exit
110 < 0: if INFO = -i, the i-th argument had an illegal value
111 > 0: SPOTRF or SSYEVD returned an error code:
112 <= N: if INFO = i and JOBZ = 'N', then the algorithm failed to
113 converge; i off-diagonal elements of an intermediate tridiago‐
114 nal form did not converge to zero; if INFO = i and JOBZ = 'V',
115 then the algorithm failed to compute an eigenvalue while work‐
116 ing on the submatrix lying in rows and columns INFO/(N+1)
117 through mod(INFO,N+1); > N: if INFO = N + i, for 1 <= i <= N,
118 then the leading minor of order i of B is not positive defi‐
119 nite. The factorization of B could not be completed and no ei‐
120 genvalues or eigenvectors were computed.
121
123 Based on contributions by
124 Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA Modi‐
125 fied so that no backsubstitution is performed if SSYEVD fails to con‐
126 verge (NEIG in old code could be greater than N causing out of bounds
127 reference to A - reported by Ralf Meyer). Also corrected the descrip‐
128 tion of INFO and the test on ITYPE. Sven, 16 Feb 05.
129
130
131
132 LAPACK driver routine (version 3.N2o)vember 2008 SSYGVD(1)