1SUBROUTINE LA_TEST_CHBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, & 2 & VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, & 3 & WORK, RWORK, IWORK, IFAIL, INFO ) 4! 5! -- LAPACK95 interface driver routine (version 1.1) -- 6! UNI-C, Denmark; 7! May 14, 1999 8! 9! .. Use Statements .. 10 USE LA_PRECISION, ONLY: WP => SP 11 USE F95_LAPACK, ONLY: LA_HBEVX 12! .. Implicit Statement .. 13 IMPLICIT NONE 14! .. Scalar Arguments .. 15 INTEGER, INTENT(IN) :: N, LDAB, KD, LDQ, LDZ, IL, IU 16 INTEGER, INTENT(INOUT) :: INFO 17 INTEGER, INTENT(OUT) :: M 18 CHARACTER*1, INTENT(IN) :: UPLO, JOBZ, RANGE 19 REAL(WP), INTENT(IN) :: VL, VU, ABSTOL 20! .. Array Arguments .. 21 INTEGER, INTENT(OUT) :: IFAIL(1:N) 22 COMPLEX(WP), INTENT(INOUT) :: AB(1:LDAB, 1:N) 23 COMPLEX(WP), INTENT(OUT):: WORK(1 : N), Z(1:LDZ, 1:N), & 24& Q(1:LDQ,1:N) 25 REAL(WP), INTENT(OUT):: W(1:N) 26 INTEGER, INTENT(OUT) :: IWORK(1: 5*N) 27 REAL(WP), INTENT(OUT) :: RWORK(1: 7*N) 28! .. Parameters .. 29 CHARACTER(LEN=8), PARAMETER :: SRNAME = 'LA_HBEVX' 30 CHARACTER(LEN=14), PARAMETER :: SRNAMT = 'LA_TEST_CHBEVX' 31! .. Common blocks .. 32 INTEGER :: INFOTC 33 COMMON /LINFO95/ INFOTC 34! .. Local Scalars .. 35 INTEGER :: I, J, IAB1, IAB2, IW, IZ1, IZ2, IQ1, IQ2, & 36 & IIL, IIU, IIFAIL 37 REAL(WP) :: IVL, IVU 38 CHARACTER*1 :: IUPLO, IJOBZ, IRANGE 39! .. Local Arrays .. 40 LOGICAL, SAVE :: CTEST = .TRUE., ETEST = .TRUE. 41 LOGICAL LSAME 42! .. Executable Statements .. 43 IAB1 = KD+1 ; IAB2 = N; IUPLO = UPLO; IW = N; IJOBZ = JOBZ 44 IZ1 = N; IZ2 = N; IRANGE = RANGE; IVL=VL; IVU=VU; IQ1 = N 45 IQ2 = N; IIL=IL; IIU=IU; IIFAIL=N 46 I = INFO / 100; J = INFO - I*100 47 SELECT CASE(I) 48 CASE (1) 49 IAB1 = -2 50 CASE (2) 51 IW = IW - 1 52 CASE (3) 53 IUPLO = 'T' 54 CASE (4) 55 IZ1 = IZ1 - 1; IJOBZ = 'V' 56 CASE (5) 57 IVL = IVU+1; IJOBZ = 'V'; IRANGE = 'V' 58 CASE (6) 59 IJOBZ = 'V'; IRANGE = 'V' 60 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO, & 61 & Z(1:IZ1, 1: IZ2), IVL, IVU, IIL, IIU, M, IFAIL, & 62 & Q, ABSTOL, INFO ) 63 CALL LA_AUX_AA01( I, CTEST, ETEST, SRNAMT ) 64 RETURN 65 CASE (7) 66 IJOBZ = 'V'; IRANGE = 'I' 67 IIL = IIU+1 68 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO, & 69 & Z(1:IZ1, 1: IZ2), IL=IIL, IU=IIU, M=M, IFAIL=IFAIL(1:IIFAIL),& 70 & Q=Q(1:IQ1,1:IQ2), ABSTOL=ABSTOL, INFO=INFO ) 71 CALL LA_AUX_AA01( I, CTEST, ETEST, SRNAMT ) 72 RETURN 73 CASE (8) 74 IJOBZ = 'V'; IRANGE = 'I' 75 IIU = IZ1+1; IIL = IIU 76 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO, & 77 & Z(1:IZ1, 1: IZ2), IL=IIL, IU=IIU, M=M, IFAIL=IFAIL(1:IIFAIL),& 78 & Q=Q(1:IQ1,1:IQ2), ABSTOL=ABSTOL, INFO=INFO ) 79 CALL LA_AUX_AA01( I, CTEST, ETEST, SRNAMT ) 80 RETURN 81 CASE (10) 82 IIFAIL = IZ1 - 3 83 IJOBZ = 'V'; IRANGE = 'V' 84 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO,& 85 & Z(1:IZ1, 1: IZ2), IVL, IVU, M=M, IFAIL=IFAIL(1:IIFAIL),& 86 & Q=Q(1:IQ1,1:IQ2), ABSTOL=ABSTOL, INFO=INFO ) 87 CALL LA_AUX_AA01( I, CTEST, ETEST, SRNAMT ) 88 RETURN 89 CASE (11) 90 IJOBZ = 'V'; IRANGE = 'V' 91 IQ1 = IZ1 - 3 92 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO,& 93 & Z(1:IZ1, 1: IZ2), IVL, IVU, M=M, IFAIL=IFAIL(1:IIFAIL),& 94 & Q=Q(1:IQ1,1:IQ2), ABSTOL=ABSTOL, INFO=INFO ) 95 CALL LA_AUX_AA01( I, CTEST, ETEST, SRNAMT ) 96 RETURN 97 CASE(:-1,9,12:) 98 CALL UESTOP(SRNAMT) 99 END SELECT 100 IF (LSAME (IJOBZ, 'V')) THEN 101 IF(LSAME(IRANGE,'V')) THEN 102 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO,& 103 & Z(1:IZ1, 1: IZ2), IVL, IVU, M=M, IFAIL=IFAIL(1:IIFAIL),& 104 & Q=Q(1:IQ1,1:IQ2), ABSTOL=ABSTOL, INFO=INFO ) 105 ELSE IF (LSAME(IRANGE,'I')) THEN 106 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO, & 107 & Z(1:IZ1, 1: IZ2), IL=IIL, IU=IIU, M=M, IFAIL=IFAIL(1:IIFAIL),& 108 & Q=Q(1:IQ1,1:IQ2), ABSTOL=ABSTOL, INFO=INFO ) 109 ELSE IF (LSAME(IRANGE,'A')) THEN 110 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO,& 111 & Z(1:IZ1, 1: IZ2), M=M, IFAIL=IFAIL(1:IIFAIL), & 112 & Q=Q(1:IQ1,1:IQ2), ABSTOL=ABSTOL, INFO=INFO ) 113 ENDIF 114 ELSE 115 IF (LSAME(IRANGE,'V')) THEN 116 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO, & 117 & VL=IVL, VU=IVU, M=M, ABSTOL=ABSTOL, INFO=INFO ) 118 ELSE IF (LSAME(IRANGE,'I')) THEN 119 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO,& 120 & IL=IIL, IU=IIU, M=M, ABSTOL=ABSTOL, INFO=INFO ) 121 ELSE IF (LSAME(IRANGE,'A')) THEN 122 CALL LA_HBEVX( AB(1:IAB1,1:IAB2), W(1 :IW), IUPLO,& 123 & M=M, ABSTOL=ABSTOL, INFO=INFO ) 124 ENDIF 125 ENDIF 126 127 CALL LA_AUX_AA01( I, CTEST, ETEST, SRNAMT ) 128 END SUBROUTINE LA_TEST_CHBEVX 129