1ZHEEVD(1) LAPACK driver routine (version 3.2) ZHEEVD(1)
2
3
4
6 ZHEEVD - computes all eigenvalues and, optionally, eigenvectors of a
7 complex Hermitian matrix A
8
10 SUBROUTINE ZHEEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
11 LRWORK, IWORK, LIWORK, INFO )
12
13 CHARACTER JOBZ, UPLO
14
15 INTEGER INFO, LDA, LIWORK, LRWORK, LWORK, N
16
17 INTEGER IWORK( * )
18
19 DOUBLE PRECISION RWORK( * ), W( * )
20
21 COMPLEX*16 A( LDA, * ), WORK( * )
22
24 ZHEEVD computes all eigenvalues and, optionally, eigenvectors of a com‐
25 plex Hermitian matrix A. If eigenvectors are desired, it uses a divide
26 and conquer algorithm.
27 The divide and conquer algorithm makes very mild assumptions about
28 floating point arithmetic. It will work on machines with a guard digit
29 in add/subtract, or on those binary machines without guard digits which
30 subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could
31 conceivably fail on hexadecimal or decimal machines without guard dig‐
32 its, but we know of none.
33
35 JOBZ (input) CHARACTER*1
36 = 'N': Compute eigenvalues only;
37 = 'V': Compute eigenvalues and eigenvectors.
38
39 UPLO (input) CHARACTER*1
40 = 'U': Upper triangle of A is stored;
41 = 'L': Lower triangle of A is stored.
42
43 N (input) INTEGER
44 The order of the matrix A. N >= 0.
45
46 A (input/output) COMPLEX*16 array, dimension (LDA, N)
47 On entry, the Hermitian matrix A. If UPLO = 'U', the leading
48 N-by-N upper triangular part of A contains the upper triangular
49 part of the matrix A. If UPLO = 'L', the leading N-by-N lower
50 triangular part of A contains the lower triangular part of the
51 matrix A. On exit, if JOBZ = 'V', then if INFO = 0, A contains
52 the orthonormal eigenvectors of the matrix A. If JOBZ = 'N',
53 then on exit the lower triangle (if UPLO='L') or the upper tri‐
54 angle (if UPLO='U') of A, including the diagonal, is destroyed.
55
56 LDA (input) INTEGER
57 The leading dimension of the array A. LDA >= max(1,N).
58
59 W (output) DOUBLE PRECISION array, dimension (N)
60 If INFO = 0, the eigenvalues in ascending order.
61
62 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
63 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
64
65 LWORK (input) INTEGER
66 The length of the array WORK. If N <= 1, LWORK
67 must be at least 1. If JOBZ = 'N' and N > 1, LWORK must be at
68 least N + 1. If JOBZ = 'V' and N > 1, LWORK must be at least
69 2*N + N**2. If LWORK = -1, then a workspace query is assumed;
70 the routine only calculates the optimal sizes of the WORK,
71 RWORK and IWORK arrays, returns these values as the first
72 entries of the WORK, RWORK and IWORK arrays, and no error mes‐
73 sage related to LWORK or LRWORK or LIWORK is issued by XERBLA.
74
75 RWORK (workspace/output) DOUBLE PRECISION array,
76 dimension (LRWORK) On exit, if INFO = 0, RWORK(1) returns the
77 optimal LRWORK.
78
79 LRWORK (input) INTEGER
80 The dimension of the array RWORK. If N <= 1,
81 LRWORK must be at least 1. If JOBZ = 'N' and N > 1, LRWORK
82 must be at least N. If JOBZ = 'V' and N > 1, LRWORK must be
83 at least 1 + 5*N + 2*N**2. If LRWORK = -1, then a workspace
84 query is assumed; the routine only calculates the optimal sizes
85 of the WORK, RWORK and IWORK arrays, returns these values as
86 the first entries of the WORK, RWORK and IWORK arrays, and no
87 error message related to LWORK or LRWORK or LIWORK is issued by
88 XERBLA.
89
90 IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
91 On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
92
93 LIWORK (input) INTEGER
94 The dimension of the array IWORK. If N <= 1,
95 LIWORK must be at least 1. If JOBZ = 'N' and N > 1, LIWORK
96 must be at least 1. If JOBZ = 'V' and N > 1, LIWORK must be
97 at least 3 + 5*N. If LIWORK = -1, then a workspace query is
98 assumed; the routine only calculates the optimal sizes of the
99 WORK, RWORK and IWORK arrays, returns these values as the first
100 entries of the WORK, RWORK and IWORK arrays, and no error mes‐
101 sage related to LWORK or LRWORK or LIWORK is issued by XERBLA.
102
103 INFO (output) INTEGER
104 = 0: successful exit
105 < 0: if INFO = -i, the i-th argument had an illegal value
106 > 0: if INFO = i and JOBZ = 'N', then the algorithm failed to
107 converge; i off-diagonal elements of an intermediate tridiago‐
108 nal form did not converge to zero; if INFO = i and JOBZ = 'V',
109 then the algorithm failed to compute an eigenvalue while work‐
110 ing on the submatrix lying in rows and columns INFO/(N+1)
111 through mod(INFO,N+1).
112
114 Based on contributions by
115 Jeff Rutter, Computer Science Division, University of California
116 at Berkeley, USA
117 Modified description of INFO. Sven, 16 Feb 05.
118
119
120
121 LAPACK driver routine (version 3.N2o)vember 2008 ZHEEVD(1)