LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
zhbevx_2stage.f
Go to the documentation of this file.
1*> \brief <b> ZHBEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
2*
3* @precisions fortran z -> s d c
4*
5* =========== DOCUMENTATION ===========
6*
7* Online html documentation available at
8* http://www.netlib.org/lapack/explore-html/
9*
10*> Download ZHBEVX_2STAGE + dependencies
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhbevx_2stage.f">
12*> [TGZ]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhbevx_2stage.f">
14*> [ZIP]</a>
15*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhbevx_2stage.f">
16*> [TXT]</a>
17*
18* Definition:
19* ===========
20*
21* SUBROUTINE ZHBEVX_2STAGE( JOBZ, RANGE, UPLO, N, KD, AB, LDAB,
22* Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W,
23* Z, LDZ, WORK, LWORK, RWORK, IWORK,
24* IFAIL, INFO )
25*
26* IMPLICIT NONE
27*
28* .. Scalar Arguments ..
29* CHARACTER JOBZ, RANGE, UPLO
30* INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N, LWORK
31* DOUBLE PRECISION ABSTOL, VL, VU
32* ..
33* .. Array Arguments ..
34* INTEGER IFAIL( * ), IWORK( * )
35* DOUBLE PRECISION RWORK( * ), W( * )
36* COMPLEX*16 AB( LDAB, * ), Q( LDQ, * ), WORK( * ),
37* $ Z( LDZ, * )
38* ..
39*
40*
41*> \par Purpose:
42* =============
43*>
44*> \verbatim
45*>
46*> ZHBEVX_2STAGE computes selected eigenvalues and, optionally, eigenvectors
47*> of a complex Hermitian band matrix A using the 2stage technique for
48*> the reduction to tridiagonal. Eigenvalues and eigenvectors
49*> can be selected by specifying either a range of values or a range of
50*> indices for the desired eigenvalues.
51*> \endverbatim
52*
53* Arguments:
54* ==========
55*
56*> \param[in] JOBZ
57*> \verbatim
58*> JOBZ is CHARACTER*1
59*> = 'N': Compute eigenvalues only;
60*> = 'V': Compute eigenvalues and eigenvectors.
61*> Not available in this release.
62*> \endverbatim
63*>
64*> \param[in] RANGE
65*> \verbatim
66*> RANGE is CHARACTER*1
67*> = 'A': all eigenvalues will be found;
68*> = 'V': all eigenvalues in the half-open interval (VL,VU]
69*> will be found;
70*> = 'I': the IL-th through IU-th eigenvalues will be found.
71*> \endverbatim
72*>
73*> \param[in] UPLO
74*> \verbatim
75*> UPLO is CHARACTER*1
76*> = 'U': Upper triangle of A is stored;
77*> = 'L': Lower triangle of A is stored.
78*> \endverbatim
79*>
80*> \param[in] N
81*> \verbatim
82*> N is INTEGER
83*> The order of the matrix A. N >= 0.
84*> \endverbatim
85*>
86*> \param[in] KD
87*> \verbatim
88*> KD is INTEGER
89*> The number of superdiagonals of the matrix A if UPLO = 'U',
90*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
91*> \endverbatim
92*>
93*> \param[in,out] AB
94*> \verbatim
95*> AB is COMPLEX*16 array, dimension (LDAB, N)
96*> On entry, the upper or lower triangle of the Hermitian band
97*> matrix A, stored in the first KD+1 rows of the array. The
98*> j-th column of A is stored in the j-th column of the array AB
99*> as follows:
100*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
101*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
102*>
103*> On exit, AB is overwritten by values generated during the
104*> reduction to tridiagonal form.
105*> \endverbatim
106*>
107*> \param[in] LDAB
108*> \verbatim
109*> LDAB is INTEGER
110*> The leading dimension of the array AB. LDAB >= KD + 1.
111*> \endverbatim
112*>
113*> \param[out] Q
114*> \verbatim
115*> Q is COMPLEX*16 array, dimension (LDQ, N)
116*> If JOBZ = 'V', the N-by-N unitary matrix used in the
117*> reduction to tridiagonal form.
118*> If JOBZ = 'N', the array Q is not referenced.
119*> \endverbatim
120*>
121*> \param[in] LDQ
122*> \verbatim
123*> LDQ is INTEGER
124*> The leading dimension of the array Q. If JOBZ = 'V', then
125*> LDQ >= max(1,N).
126*> \endverbatim
127*>
128*> \param[in] VL
129*> \verbatim
130*> VL is DOUBLE PRECISION
131*> If RANGE='V', the lower bound of the interval to
132*> be searched for eigenvalues. VL < VU.
133*> Not referenced if RANGE = 'A' or 'I'.
134*> \endverbatim
135*>
136*> \param[in] VU
137*> \verbatim
138*> VU is DOUBLE PRECISION
139*> If RANGE='V', the upper bound of the interval to
140*> be searched for eigenvalues. VL < VU.
141*> Not referenced if RANGE = 'A' or 'I'.
142*> \endverbatim
143*>
144*> \param[in] IL
145*> \verbatim
146*> IL is INTEGER
147*> If RANGE='I', the index of the
148*> smallest eigenvalue to be returned.
149*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
150*> Not referenced if RANGE = 'A' or 'V'.
151*> \endverbatim
152*>
153*> \param[in] IU
154*> \verbatim
155*> IU is INTEGER
156*> If RANGE='I', the index of the
157*> largest eigenvalue to be returned.
158*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
159*> Not referenced if RANGE = 'A' or 'V'.
160*> \endverbatim
161*>
162*> \param[in] ABSTOL
163*> \verbatim
164*> ABSTOL is DOUBLE PRECISION
165*> The absolute error tolerance for the eigenvalues.
166*> An approximate eigenvalue is accepted as converged
167*> when it is determined to lie in an interval [a,b]
168*> of width less than or equal to
169*>
170*> ABSTOL + EPS * max( |a|,|b| ) ,
171*>
172*> where EPS is the machine precision. If ABSTOL is less than
173*> or equal to zero, then EPS*|T| will be used in its place,
174*> where |T| is the 1-norm of the tridiagonal matrix obtained
175*> by reducing AB to tridiagonal form.
176*>
177*> Eigenvalues will be computed most accurately when ABSTOL is
178*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
179*> If this routine returns with INFO>0, indicating that some
180*> eigenvectors did not converge, try setting ABSTOL to
181*> 2*DLAMCH('S').
182*>
183*> See "Computing Small Singular Values of Bidiagonal Matrices
184*> with Guaranteed High Relative Accuracy," by Demmel and
185*> Kahan, LAPACK Working Note #3.
186*> \endverbatim
187*>
188*> \param[out] M
189*> \verbatim
190*> M is INTEGER
191*> The total number of eigenvalues found. 0 <= M <= N.
192*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
193*> \endverbatim
194*>
195*> \param[out] W
196*> \verbatim
197*> W is DOUBLE PRECISION array, dimension (N)
198*> The first M elements contain the selected eigenvalues in
199*> ascending order.
200*> \endverbatim
201*>
202*> \param[out] Z
203*> \verbatim
204*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M))
205*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
206*> contain the orthonormal eigenvectors of the matrix A
207*> corresponding to the selected eigenvalues, with the i-th
208*> column of Z holding the eigenvector associated with W(i).
209*> If an eigenvector fails to converge, then that column of Z
210*> contains the latest approximation to the eigenvector, and the
211*> index of the eigenvector is returned in IFAIL.
212*> If JOBZ = 'N', then Z is not referenced.
213*> Note: the user must ensure that at least max(1,M) columns are
214*> supplied in the array Z; if RANGE = 'V', the exact value of M
215*> is not known in advance and an upper bound must be used.
216*> \endverbatim
217*>
218*> \param[in] LDZ
219*> \verbatim
220*> LDZ is INTEGER
221*> The leading dimension of the array Z. LDZ >= 1, and if
222*> JOBZ = 'V', LDZ >= max(1,N).
223*> \endverbatim
224*>
225*> \param[out] WORK
226*> \verbatim
227*> WORK is COMPLEX*16 array, dimension (LWORK)
228*> \endverbatim
229*>
230*> \param[in] LWORK
231*> \verbatim
232*> LWORK is INTEGER
233*> The length of the array WORK. LWORK >= 1, when N <= 1;
234*> otherwise
235*> If JOBZ = 'N' and N > 1, LWORK must be queried.
236*> LWORK = MAX(1, dimension) where
237*> dimension = (2KD+1)*N + KD*NTHREADS
238*> where KD is the size of the band.
239*> NTHREADS is the number of threads used when
240*> openMP compilation is enabled, otherwise =1.
241*> If JOBZ = 'V' and N > 1, LWORK must be queried. Not yet available.
242*>
243*> If LWORK = -1, then a workspace query is assumed; the routine
244*> only calculates the optimal sizes of the WORK, RWORK and
245*> IWORK arrays, returns these values as the first entries of
246*> the WORK, RWORK and IWORK arrays, and no error message
247*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
248*> \endverbatim
249*>
250*> \param[out] RWORK
251*> \verbatim
252*> RWORK is DOUBLE PRECISION array, dimension (7*N)
253*> \endverbatim
254*>
255*> \param[out] IWORK
256*> \verbatim
257*> IWORK is INTEGER array, dimension (5*N)
258*> \endverbatim
259*>
260*> \param[out] IFAIL
261*> \verbatim
262*> IFAIL is INTEGER array, dimension (N)
263*> If JOBZ = 'V', then if INFO = 0, the first M elements of
264*> IFAIL are zero. If INFO > 0, then IFAIL contains the
265*> indices of the eigenvectors that failed to converge.
266*> If JOBZ = 'N', then IFAIL is not referenced.
267*> \endverbatim
268*>
269*> \param[out] INFO
270*> \verbatim
271*> INFO is INTEGER
272*> = 0: successful exit
273*> < 0: if INFO = -i, the i-th argument had an illegal value
274*> > 0: if INFO = i, then i eigenvectors failed to converge.
275*> Their indices are stored in array IFAIL.
276*> \endverbatim
277*
278* Authors:
279* ========
280*
281*> \author Univ. of Tennessee
282*> \author Univ. of California Berkeley
283*> \author Univ. of Colorado Denver
284*> \author NAG Ltd.
285*
286*> \ingroup hbevx_2stage
287*
288*> \par Further Details:
289* =====================
290*>
291*> \verbatim
292*>
293*> All details about the 2stage techniques are available in:
294*>
295*> Azzam Haidar, Hatem Ltaief, and Jack Dongarra.
296*> Parallel reduction to condensed forms for symmetric eigenvalue problems
297*> using aggregated fine-grained and memory-aware kernels. In Proceedings
298*> of 2011 International Conference for High Performance Computing,
299*> Networking, Storage and Analysis (SC '11), New York, NY, USA,
300*> Article 8 , 11 pages.
301*> http://doi.acm.org/10.1145/2063384.2063394
302*>
303*> A. Haidar, J. Kurzak, P. Luszczek, 2013.
304*> An improved parallel singular value algorithm and its implementation
305*> for multicore hardware, In Proceedings of 2013 International Conference
306*> for High Performance Computing, Networking, Storage and Analysis (SC '13).
307*> Denver, Colorado, USA, 2013.
308*> Article 90, 12 pages.
309*> http://doi.acm.org/10.1145/2503210.2503292
310*>
311*> A. Haidar, R. Solca, S. Tomov, T. Schulthess and J. Dongarra.
312*> A novel hybrid CPU-GPU generalized eigensolver for electronic structure
313*> calculations based on fine-grained memory aware tasks.
314*> International Journal of High Performance Computing Applications.
315*> Volume 28 Issue 2, Pages 196-209, May 2014.
316*> http://hpc.sagepub.com/content/28/2/196
317*>
318*> \endverbatim
319*
320* =====================================================================
321 SUBROUTINE zhbevx_2stage( JOBZ, RANGE, UPLO, N, KD, AB, LDAB,
322 $ Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W,
323 $ Z, LDZ, WORK, LWORK, RWORK, IWORK,
324 $ IFAIL, INFO )
325*
326 IMPLICIT NONE
327*
328* -- LAPACK driver routine --
329* -- LAPACK is a software package provided by Univ. of Tennessee, --
330* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
331*
332* .. Scalar Arguments ..
333 CHARACTER JOBZ, RANGE, UPLO
334 INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N, LWORK
335 DOUBLE PRECISION ABSTOL, VL, VU
336* ..
337* .. Array Arguments ..
338 INTEGER IFAIL( * ), IWORK( * )
339 DOUBLE PRECISION RWORK( * ), W( * )
340 COMPLEX*16 AB( LDAB, * ), Q( LDQ, * ), WORK( * ),
341 $ z( ldz, * )
342* ..
343*
344* =====================================================================
345*
346* .. Parameters ..
347 DOUBLE PRECISION ZERO, ONE
348 PARAMETER ( ZERO = 0.0d0, one = 1.0d0 )
349 COMPLEX*16 CZERO, CONE
350 parameter( czero = ( 0.0d0, 0.0d0 ),
351 $ cone = ( 1.0d0, 0.0d0 ) )
352* ..
353* .. Local Scalars ..
354 LOGICAL ALLEIG, INDEIG, LOWER, TEST, VALEIG, WANTZ,
355 $ LQUERY
356 CHARACTER ORDER
357 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE, INDIBL,
358 $ INDISP, INDIWK, INDRWK, INDWRK, ISCALE, ITMP1,
359 $ llwork, lwmin, lhtrd, lwtrd, ib, indhous,
360 $ j, jj, nsplit
361 DOUBLE PRECISION ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
362 $ SIGMA, SMLNUM, TMP1, VLL, VUU
363 COMPLEX*16 CTMP1
364* ..
365* .. External Functions ..
366 LOGICAL LSAME
367 INTEGER ILAENV2STAGE
368 DOUBLE PRECISION DLAMCH, ZLANHB
369 EXTERNAL lsame, dlamch, zlanhb, ilaenv2stage
370* ..
371* .. External Subroutines ..
372 EXTERNAL dcopy, dscal, dstebz, dsterf, xerbla,
373 $ zcopy,
376* ..
377* .. Intrinsic Functions ..
378 INTRINSIC dble, max, min, sqrt
379* ..
380* .. Executable Statements ..
381*
382* Test the input parameters.
383*
384 wantz = lsame( jobz, 'V' )
385 alleig = lsame( range, 'A' )
386 valeig = lsame( range, 'V' )
387 indeig = lsame( range, 'I' )
388 lower = lsame( uplo, 'L' )
389 lquery = ( lwork.EQ.-1 )
390*
391 info = 0
392 IF( .NOT.( lsame( jobz, 'N' ) ) ) THEN
393 info = -1
394 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) ) THEN
395 info = -2
396 ELSE IF( .NOT.( lower .OR. lsame( uplo, 'U' ) ) ) THEN
397 info = -3
398 ELSE IF( n.LT.0 ) THEN
399 info = -4
400 ELSE IF( kd.LT.0 ) THEN
401 info = -5
402 ELSE IF( ldab.LT.kd+1 ) THEN
403 info = -7
404 ELSE IF( wantz .AND. ldq.LT.max( 1, n ) ) THEN
405 info = -9
406 ELSE
407 IF( valeig ) THEN
408 IF( n.GT.0 .AND. vu.LE.vl )
409 $ info = -11
410 ELSE IF( indeig ) THEN
411 IF( il.LT.1 .OR. il.GT.max( 1, n ) ) THEN
412 info = -12
413 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n ) THEN
414 info = -13
415 END IF
416 END IF
417 END IF
418 IF( info.EQ.0 ) THEN
419 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
420 $ info = -18
421 END IF
422*
423 IF( info.EQ.0 ) THEN
424 IF( n.LE.1 ) THEN
425 lwmin = 1
426 work( 1 ) = lwmin
427 ELSE
428 ib = ilaenv2stage( 2, 'ZHETRD_HB2ST', jobz,
429 $ n, kd, -1, -1 )
430 lhtrd = ilaenv2stage( 3, 'ZHETRD_HB2ST', jobz,
431 $ n, kd, ib, -1 )
432 lwtrd = ilaenv2stage( 4, 'ZHETRD_HB2ST', jobz,
433 $ n, kd, ib, -1 )
434 lwmin = lhtrd + lwtrd
435 work( 1 ) = lwmin
436 ENDIF
437*
438 IF( lwork.LT.lwmin .AND. .NOT.lquery )
439 $ info = -20
440 END IF
441*
442 IF( info.NE.0 ) THEN
443 CALL xerbla( 'ZHBEVX_2STAGE', -info )
444 RETURN
445 ELSE IF( lquery ) THEN
446 RETURN
447 END IF
448*
449* Quick return if possible
450*
451 m = 0
452 IF( n.EQ.0 )
453 $ RETURN
454*
455 IF( n.EQ.1 ) THEN
456 m = 1
457 IF( lower ) THEN
458 ctmp1 = ab( 1, 1 )
459 ELSE
460 ctmp1 = ab( kd+1, 1 )
461 END IF
462 tmp1 = dble( ctmp1 )
463 IF( valeig ) THEN
464 IF( .NOT.( vl.LT.tmp1 .AND. vu.GE.tmp1 ) )
465 $ m = 0
466 END IF
467 IF( m.EQ.1 ) THEN
468 w( 1 ) = dble( ctmp1 )
469 IF( wantz )
470 $ z( 1, 1 ) = cone
471 END IF
472 RETURN
473 END IF
474*
475* Get machine constants.
476*
477 safmin = dlamch( 'Safe minimum' )
478 eps = dlamch( 'Precision' )
479 smlnum = safmin / eps
480 bignum = one / smlnum
481 rmin = sqrt( smlnum )
482 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
483*
484* Scale matrix to allowable range, if necessary.
485*
486 iscale = 0
487 abstll = abstol
488 IF( valeig ) THEN
489 vll = vl
490 vuu = vu
491 ELSE
492 vll = zero
493 vuu = zero
494 END IF
495 anrm = zlanhb( 'M', uplo, n, kd, ab, ldab, rwork )
496 IF( anrm.GT.zero .AND. anrm.LT.rmin ) THEN
497 iscale = 1
498 sigma = rmin / anrm
499 ELSE IF( anrm.GT.rmax ) THEN
500 iscale = 1
501 sigma = rmax / anrm
502 END IF
503 IF( iscale.EQ.1 ) THEN
504 IF( lower ) THEN
505 CALL zlascl( 'B', kd, kd, one, sigma, n, n, ab, ldab,
506 $ info )
507 ELSE
508 CALL zlascl( 'Q', kd, kd, one, sigma, n, n, ab, ldab,
509 $ info )
510 END IF
511 IF( abstol.GT.0 )
512 $ abstll = abstol*sigma
513 IF( valeig ) THEN
514 vll = vl*sigma
515 vuu = vu*sigma
516 END IF
517 END IF
518*
519* Call ZHBTRD_HB2ST to reduce Hermitian band matrix to tridiagonal form.
520*
521 indd = 1
522 inde = indd + n
523 indrwk = inde + n
524*
525 indhous = 1
526 indwrk = indhous + lhtrd
527 llwork = lwork - indwrk + 1
528*
529 CALL zhetrd_hb2st( 'N', jobz, uplo, n, kd, ab, ldab,
530 $ rwork( indd ), rwork( inde ), work( indhous ),
531 $ lhtrd, work( indwrk ), llwork, iinfo )
532*
533* If all eigenvalues are desired and ABSTOL is less than or equal
534* to zero, then call DSTERF or ZSTEQR. If this fails for some
535* eigenvalue, then try DSTEBZ.
536*
537 test = .false.
538 IF (indeig) THEN
539 IF (il.EQ.1 .AND. iu.EQ.n) THEN
540 test = .true.
541 END IF
542 END IF
543 IF ((alleig .OR. test) .AND. (abstol.LE.zero)) THEN
544 CALL dcopy( n, rwork( indd ), 1, w, 1 )
545 indee = indrwk + 2*n
546 IF( .NOT.wantz ) THEN
547 CALL dcopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
548 CALL dsterf( n, w, rwork( indee ), info )
549 ELSE
550 CALL zlacpy( 'A', n, n, q, ldq, z, ldz )
551 CALL dcopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
552 CALL zsteqr( jobz, n, w, rwork( indee ), z, ldz,
553 $ rwork( indrwk ), info )
554 IF( info.EQ.0 ) THEN
555 DO 10 i = 1, n
556 ifail( i ) = 0
557 10 CONTINUE
558 END IF
559 END IF
560 IF( info.EQ.0 ) THEN
561 m = n
562 GO TO 30
563 END IF
564 info = 0
565 END IF
566*
567* Otherwise, call DSTEBZ and, if eigenvectors are desired, ZSTEIN.
568*
569 IF( wantz ) THEN
570 order = 'B'
571 ELSE
572 order = 'E'
573 END IF
574 indibl = 1
575 indisp = indibl + n
576 indiwk = indisp + n
577 CALL dstebz( range, order, n, vll, vuu, il, iu, abstll,
578 $ rwork( indd ), rwork( inde ), m, nsplit, w,
579 $ iwork( indibl ), iwork( indisp ), rwork( indrwk ),
580 $ iwork( indiwk ), info )
581*
582 IF( wantz ) THEN
583 CALL zstein( n, rwork( indd ), rwork( inde ), m, w,
584 $ iwork( indibl ), iwork( indisp ), z, ldz,
585 $ rwork( indrwk ), iwork( indiwk ), ifail, info )
586*
587* Apply unitary matrix used in reduction to tridiagonal
588* form to eigenvectors returned by ZSTEIN.
589*
590 DO 20 j = 1, m
591 CALL zcopy( n, z( 1, j ), 1, work( 1 ), 1 )
592 CALL zgemv( 'N', n, n, cone, q, ldq, work, 1, czero,
593 $ z( 1, j ), 1 )
594 20 CONTINUE
595 END IF
596*
597* If matrix was scaled, then rescale eigenvalues appropriately.
598*
599 30 CONTINUE
600 IF( iscale.EQ.1 ) THEN
601 IF( info.EQ.0 ) THEN
602 imax = m
603 ELSE
604 imax = info - 1
605 END IF
606 CALL dscal( imax, one / sigma, w, 1 )
607 END IF
608*
609* If eigenvalues are not in order, then sort them, along with
610* eigenvectors.
611*
612 IF( wantz ) THEN
613 DO 50 j = 1, m - 1
614 i = 0
615 tmp1 = w( j )
616 DO 40 jj = j + 1, m
617 IF( w( jj ).LT.tmp1 ) THEN
618 i = jj
619 tmp1 = w( jj )
620 END IF
621 40 CONTINUE
622*
623 IF( i.NE.0 ) THEN
624 itmp1 = iwork( indibl+i-1 )
625 w( i ) = w( j )
626 iwork( indibl+i-1 ) = iwork( indibl+j-1 )
627 w( j ) = tmp1
628 iwork( indibl+j-1 ) = itmp1
629 CALL zswap( n, z( 1, i ), 1, z( 1, j ), 1 )
630 IF( info.NE.0 ) THEN
631 itmp1 = ifail( i )
632 ifail( i ) = ifail( j )
633 ifail( j ) = itmp1
634 END IF
635 END IF
636 50 CONTINUE
637 END IF
638*
639* Set WORK(1) to optimal workspace size.
640*
641 work( 1 ) = lwmin
642*
643 RETURN
644*
645* End of ZHBEVX_2STAGE
646*
647 END
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
Definition zcopy.f:81
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
Definition dcopy.f:82
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
Definition zgemv.f:160
subroutine zhbevx_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)
ZHBEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER ...
subroutine zhetrd_hb2st(stage1, vect, uplo, n, kd, ab, ldab, d, e, hous, lhous, work, lwork, info)
ZHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
Definition zlacpy.f:101
subroutine zlascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
ZLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
Definition zlascl.f:142
subroutine dscal(n, da, dx, incx)
DSCAL
Definition dscal.f:79
subroutine dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
DSTEBZ
Definition dstebz.f:272
subroutine zstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
ZSTEIN
Definition zstein.f:180
subroutine zsteqr(compz, n, d, e, z, ldz, work, info)
ZSTEQR
Definition zsteqr.f:130
subroutine dsterf(n, d, e, info)
DSTERF
Definition dsterf.f:84
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
Definition zswap.f:81