1*> \brief \b ZERRHS 2* 3* =========== DOCUMENTATION =========== 4* 5* Online html documentation available at 6* http://www.netlib.org/lapack/explore-html/ 7* 8* Definition: 9* =========== 10* 11* SUBROUTINE ZERRHS( PATH, NUNIT ) 12* 13* .. Scalar Arguments .. 14* CHARACTER*3 PATH 15* INTEGER NUNIT 16* .. 17* 18* 19*> \par Purpose: 20* ============= 21*> 22*> \verbatim 23*> 24*> ZERRHS tests the error exits for ZGEBAK, CGEBAL, CGEHRD, ZUNGHR, 25*> ZUNMHR, ZHSEQR, CHSEIN, and ZTREVC. 26*> \endverbatim 27* 28* Arguments: 29* ========== 30* 31*> \param[in] PATH 32*> \verbatim 33*> PATH is CHARACTER*3 34*> The LAPACK path name for the routines to be tested. 35*> \endverbatim 36*> 37*> \param[in] NUNIT 38*> \verbatim 39*> NUNIT is INTEGER 40*> The unit number for output. 41*> \endverbatim 42* 43* Authors: 44* ======== 45* 46*> \author Univ. of Tennessee 47*> \author Univ. of California Berkeley 48*> \author Univ. of Colorado Denver 49*> \author NAG Ltd. 50* 51*> \ingroup complex16_eig 52* 53* ===================================================================== 54 SUBROUTINE ZERRHS( PATH, NUNIT ) 55* 56* -- LAPACK test routine -- 57* -- LAPACK is a software package provided by Univ. of Tennessee, -- 58* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 59* 60* .. Scalar Arguments .. 61 CHARACTER*3 PATH 62 INTEGER NUNIT 63* .. 64* 65* ===================================================================== 66* 67* .. Parameters .. 68 INTEGER NMAX, LW 69 PARAMETER ( NMAX = 3, LW = NMAX*NMAX ) 70* .. 71* .. Local Scalars .. 72 CHARACTER*2 C2 73 INTEGER I, IHI, ILO, INFO, J, M, NT 74* .. 75* .. Local Arrays .. 76 LOGICAL SEL( NMAX ) 77 INTEGER IFAILL( NMAX ), IFAILR( NMAX ) 78 DOUBLE PRECISION RW( NMAX ), S( NMAX ) 79 COMPLEX*16 A( NMAX, NMAX ), C( NMAX, NMAX ), TAU( NMAX ), 80 $ VL( NMAX, NMAX ), VR( NMAX, NMAX ), W( LW ), 81 $ X( NMAX ) 82* .. 83* .. External Functions .. 84 LOGICAL LSAMEN 85 EXTERNAL LSAMEN 86* .. 87* .. External Subroutines .. 88 EXTERNAL CHKXER, ZGEBAK, ZGEBAL, ZGEHRD, ZHSEIN, ZHSEQR, 89 $ ZTREVC, ZUNGHR, ZUNMHR 90* .. 91* .. Intrinsic Functions .. 92 INTRINSIC DBLE 93* .. 94* .. Scalars in Common .. 95 LOGICAL LERR, OK 96 CHARACTER*32 SRNAMT 97 INTEGER INFOT, NOUT 98* .. 99* .. Common blocks .. 100 COMMON / INFOC / INFOT, NOUT, OK, LERR 101 COMMON / SRNAMC / SRNAMT 102* .. 103* .. Executable Statements .. 104* 105 NOUT = NUNIT 106 WRITE( NOUT, FMT = * ) 107 C2 = PATH( 2: 3 ) 108* 109* Set the variables to innocuous values. 110* 111 DO 20 J = 1, NMAX 112 DO 10 I = 1, NMAX 113 A( I, J ) = 1.D0 / DBLE( I+J ) 114 10 CONTINUE 115 SEL( J ) = .TRUE. 116 20 CONTINUE 117 OK = .TRUE. 118 NT = 0 119* 120* Test error exits of the nonsymmetric eigenvalue routines. 121* 122 IF( LSAMEN( 2, C2, 'HS' ) ) THEN 123* 124* ZGEBAL 125* 126 SRNAMT = 'ZGEBAL' 127 INFOT = 1 128 CALL ZGEBAL( '/', 0, A, 1, ILO, IHI, S, INFO ) 129 CALL CHKXER( 'ZGEBAL', INFOT, NOUT, LERR, OK ) 130 INFOT = 2 131 CALL ZGEBAL( 'N', -1, A, 1, ILO, IHI, S, INFO ) 132 CALL CHKXER( 'ZGEBAL', INFOT, NOUT, LERR, OK ) 133 INFOT = 4 134 CALL ZGEBAL( 'N', 2, A, 1, ILO, IHI, S, INFO ) 135 CALL CHKXER( 'ZGEBAL', INFOT, NOUT, LERR, OK ) 136 NT = NT + 3 137* 138* ZGEBAK 139* 140 SRNAMT = 'ZGEBAK' 141 INFOT = 1 142 CALL ZGEBAK( '/', 'R', 0, 1, 0, S, 0, A, 1, INFO ) 143 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 144 INFOT = 2 145 CALL ZGEBAK( 'N', '/', 0, 1, 0, S, 0, A, 1, INFO ) 146 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 147 INFOT = 3 148 CALL ZGEBAK( 'N', 'R', -1, 1, 0, S, 0, A, 1, INFO ) 149 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 150 INFOT = 4 151 CALL ZGEBAK( 'N', 'R', 0, 0, 0, S, 0, A, 1, INFO ) 152 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 153 INFOT = 4 154 CALL ZGEBAK( 'N', 'R', 0, 2, 0, S, 0, A, 1, INFO ) 155 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 156 INFOT = 5 157 CALL ZGEBAK( 'N', 'R', 2, 2, 1, S, 0, A, 2, INFO ) 158 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 159 INFOT = 5 160 CALL ZGEBAK( 'N', 'R', 0, 1, 1, S, 0, A, 1, INFO ) 161 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 162 INFOT = 7 163 CALL ZGEBAK( 'N', 'R', 0, 1, 0, S, -1, A, 1, INFO ) 164 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 165 INFOT = 9 166 CALL ZGEBAK( 'N', 'R', 2, 1, 2, S, 0, A, 1, INFO ) 167 CALL CHKXER( 'ZGEBAK', INFOT, NOUT, LERR, OK ) 168 NT = NT + 9 169* 170* ZGEHRD 171* 172 SRNAMT = 'ZGEHRD' 173 INFOT = 1 174 CALL ZGEHRD( -1, 1, 1, A, 1, TAU, W, 1, INFO ) 175 CALL CHKXER( 'ZGEHRD', INFOT, NOUT, LERR, OK ) 176 INFOT = 2 177 CALL ZGEHRD( 0, 0, 0, A, 1, TAU, W, 1, INFO ) 178 CALL CHKXER( 'ZGEHRD', INFOT, NOUT, LERR, OK ) 179 INFOT = 2 180 CALL ZGEHRD( 0, 2, 0, A, 1, TAU, W, 1, INFO ) 181 CALL CHKXER( 'ZGEHRD', INFOT, NOUT, LERR, OK ) 182 INFOT = 3 183 CALL ZGEHRD( 1, 1, 0, A, 1, TAU, W, 1, INFO ) 184 CALL CHKXER( 'ZGEHRD', INFOT, NOUT, LERR, OK ) 185 INFOT = 3 186 CALL ZGEHRD( 0, 1, 1, A, 1, TAU, W, 1, INFO ) 187 CALL CHKXER( 'ZGEHRD', INFOT, NOUT, LERR, OK ) 188 INFOT = 5 189 CALL ZGEHRD( 2, 1, 1, A, 1, TAU, W, 2, INFO ) 190 CALL CHKXER( 'ZGEHRD', INFOT, NOUT, LERR, OK ) 191 INFOT = 8 192 CALL ZGEHRD( 2, 1, 2, A, 2, TAU, W, 1, INFO ) 193 CALL CHKXER( 'ZGEHRD', INFOT, NOUT, LERR, OK ) 194 NT = NT + 7 195* 196* ZUNGHR 197* 198 SRNAMT = 'ZUNGHR' 199 INFOT = 1 200 CALL ZUNGHR( -1, 1, 1, A, 1, TAU, W, 1, INFO ) 201 CALL CHKXER( 'ZUNGHR', INFOT, NOUT, LERR, OK ) 202 INFOT = 2 203 CALL ZUNGHR( 0, 0, 0, A, 1, TAU, W, 1, INFO ) 204 CALL CHKXER( 'ZUNGHR', INFOT, NOUT, LERR, OK ) 205 INFOT = 2 206 CALL ZUNGHR( 0, 2, 0, A, 1, TAU, W, 1, INFO ) 207 CALL CHKXER( 'ZUNGHR', INFOT, NOUT, LERR, OK ) 208 INFOT = 3 209 CALL ZUNGHR( 1, 1, 0, A, 1, TAU, W, 1, INFO ) 210 CALL CHKXER( 'ZUNGHR', INFOT, NOUT, LERR, OK ) 211 INFOT = 3 212 CALL ZUNGHR( 0, 1, 1, A, 1, TAU, W, 1, INFO ) 213 CALL CHKXER( 'ZUNGHR', INFOT, NOUT, LERR, OK ) 214 INFOT = 5 215 CALL ZUNGHR( 2, 1, 1, A, 1, TAU, W, 1, INFO ) 216 CALL CHKXER( 'ZUNGHR', INFOT, NOUT, LERR, OK ) 217 INFOT = 8 218 CALL ZUNGHR( 3, 1, 3, A, 3, TAU, W, 1, INFO ) 219 CALL CHKXER( 'ZUNGHR', INFOT, NOUT, LERR, OK ) 220 NT = NT + 7 221* 222* ZUNMHR 223* 224 SRNAMT = 'ZUNMHR' 225 INFOT = 1 226 CALL ZUNMHR( '/', 'N', 0, 0, 1, 0, A, 1, TAU, C, 1, W, 1, 227 $ INFO ) 228 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 229 INFOT = 2 230 CALL ZUNMHR( 'L', '/', 0, 0, 1, 0, A, 1, TAU, C, 1, W, 1, 231 $ INFO ) 232 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 233 INFOT = 3 234 CALL ZUNMHR( 'L', 'N', -1, 0, 1, 0, A, 1, TAU, C, 1, W, 1, 235 $ INFO ) 236 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 237 INFOT = 4 238 CALL ZUNMHR( 'L', 'N', 0, -1, 1, 0, A, 1, TAU, C, 1, W, 1, 239 $ INFO ) 240 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 241 INFOT = 5 242 CALL ZUNMHR( 'L', 'N', 0, 0, 0, 0, A, 1, TAU, C, 1, W, 1, 243 $ INFO ) 244 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 245 INFOT = 5 246 CALL ZUNMHR( 'L', 'N', 0, 0, 2, 0, A, 1, TAU, C, 1, W, 1, 247 $ INFO ) 248 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 249 INFOT = 5 250 CALL ZUNMHR( 'L', 'N', 1, 2, 2, 1, A, 1, TAU, C, 1, W, 2, 251 $ INFO ) 252 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 253 INFOT = 5 254 CALL ZUNMHR( 'R', 'N', 2, 1, 2, 1, A, 1, TAU, C, 2, W, 2, 255 $ INFO ) 256 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 257 INFOT = 6 258 CALL ZUNMHR( 'L', 'N', 1, 1, 1, 0, A, 1, TAU, C, 1, W, 1, 259 $ INFO ) 260 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 261 INFOT = 6 262 CALL ZUNMHR( 'L', 'N', 0, 1, 1, 1, A, 1, TAU, C, 1, W, 1, 263 $ INFO ) 264 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 265 INFOT = 6 266 CALL ZUNMHR( 'R', 'N', 1, 0, 1, 1, A, 1, TAU, C, 1, W, 1, 267 $ INFO ) 268 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 269 INFOT = 8 270 CALL ZUNMHR( 'L', 'N', 2, 1, 1, 1, A, 1, TAU, C, 2, W, 1, 271 $ INFO ) 272 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 273 INFOT = 8 274 CALL ZUNMHR( 'R', 'N', 1, 2, 1, 1, A, 1, TAU, C, 1, W, 1, 275 $ INFO ) 276 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 277 INFOT = 11 278 CALL ZUNMHR( 'L', 'N', 2, 1, 1, 1, A, 2, TAU, C, 1, W, 1, 279 $ INFO ) 280 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 281 INFOT = 13 282 CALL ZUNMHR( 'L', 'N', 1, 2, 1, 1, A, 1, TAU, C, 1, W, 1, 283 $ INFO ) 284 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 285 INFOT = 13 286 CALL ZUNMHR( 'R', 'N', 2, 1, 1, 1, A, 1, TAU, C, 2, W, 1, 287 $ INFO ) 288 CALL CHKXER( 'ZUNMHR', INFOT, NOUT, LERR, OK ) 289 NT = NT + 16 290* 291* ZHSEQR 292* 293 SRNAMT = 'ZHSEQR' 294 INFOT = 1 295 CALL ZHSEQR( '/', 'N', 0, 1, 0, A, 1, X, C, 1, W, 1, INFO ) 296 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 297 INFOT = 2 298 CALL ZHSEQR( 'E', '/', 0, 1, 0, A, 1, X, C, 1, W, 1, INFO ) 299 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 300 INFOT = 3 301 CALL ZHSEQR( 'E', 'N', -1, 1, 0, A, 1, X, C, 1, W, 1, INFO ) 302 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 303 INFOT = 4 304 CALL ZHSEQR( 'E', 'N', 0, 0, 0, A, 1, X, C, 1, W, 1, INFO ) 305 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 306 INFOT = 4 307 CALL ZHSEQR( 'E', 'N', 0, 2, 0, A, 1, X, C, 1, W, 1, INFO ) 308 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 309 INFOT = 5 310 CALL ZHSEQR( 'E', 'N', 1, 1, 0, A, 1, X, C, 1, W, 1, INFO ) 311 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 312 INFOT = 5 313 CALL ZHSEQR( 'E', 'N', 1, 1, 2, A, 1, X, C, 1, W, 1, INFO ) 314 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 315 INFOT = 7 316 CALL ZHSEQR( 'E', 'N', 2, 1, 2, A, 1, X, C, 2, W, 1, INFO ) 317 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 318 INFOT = 10 319 CALL ZHSEQR( 'E', 'V', 2, 1, 2, A, 2, X, C, 1, W, 1, INFO ) 320 CALL CHKXER( 'ZHSEQR', INFOT, NOUT, LERR, OK ) 321 NT = NT + 9 322* 323* ZHSEIN 324* 325 SRNAMT = 'ZHSEIN' 326 INFOT = 1 327 CALL ZHSEIN( '/', 'N', 'N', SEL, 0, A, 1, X, VL, 1, VR, 1, 0, 328 $ M, W, RW, IFAILL, IFAILR, INFO ) 329 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 330 INFOT = 2 331 CALL ZHSEIN( 'R', '/', 'N', SEL, 0, A, 1, X, VL, 1, VR, 1, 0, 332 $ M, W, RW, IFAILL, IFAILR, INFO ) 333 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 334 INFOT = 3 335 CALL ZHSEIN( 'R', 'N', '/', SEL, 0, A, 1, X, VL, 1, VR, 1, 0, 336 $ M, W, RW, IFAILL, IFAILR, INFO ) 337 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 338 INFOT = 5 339 CALL ZHSEIN( 'R', 'N', 'N', SEL, -1, A, 1, X, VL, 1, VR, 1, 0, 340 $ M, W, RW, IFAILL, IFAILR, INFO ) 341 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 342 INFOT = 7 343 CALL ZHSEIN( 'R', 'N', 'N', SEL, 2, A, 1, X, VL, 1, VR, 2, 4, 344 $ M, W, RW, IFAILL, IFAILR, INFO ) 345 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 346 INFOT = 10 347 CALL ZHSEIN( 'L', 'N', 'N', SEL, 2, A, 2, X, VL, 1, VR, 1, 4, 348 $ M, W, RW, IFAILL, IFAILR, INFO ) 349 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 350 INFOT = 12 351 CALL ZHSEIN( 'R', 'N', 'N', SEL, 2, A, 2, X, VL, 1, VR, 1, 4, 352 $ M, W, RW, IFAILL, IFAILR, INFO ) 353 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 354 INFOT = 13 355 CALL ZHSEIN( 'R', 'N', 'N', SEL, 2, A, 2, X, VL, 1, VR, 2, 1, 356 $ M, W, RW, IFAILL, IFAILR, INFO ) 357 CALL CHKXER( 'ZHSEIN', INFOT, NOUT, LERR, OK ) 358 NT = NT + 8 359* 360* ZTREVC 361* 362 SRNAMT = 'ZTREVC' 363 INFOT = 1 364 CALL ZTREVC( '/', 'A', SEL, 0, A, 1, VL, 1, VR, 1, 0, M, W, RW, 365 $ INFO ) 366 CALL CHKXER( 'ZTREVC', INFOT, NOUT, LERR, OK ) 367 INFOT = 2 368 CALL ZTREVC( 'L', '/', SEL, 0, A, 1, VL, 1, VR, 1, 0, M, W, RW, 369 $ INFO ) 370 CALL CHKXER( 'ZTREVC', INFOT, NOUT, LERR, OK ) 371 INFOT = 4 372 CALL ZTREVC( 'L', 'A', SEL, -1, A, 1, VL, 1, VR, 1, 0, M, W, 373 $ RW, INFO ) 374 CALL CHKXER( 'ZTREVC', INFOT, NOUT, LERR, OK ) 375 INFOT = 6 376 CALL ZTREVC( 'L', 'A', SEL, 2, A, 1, VL, 2, VR, 1, 4, M, W, RW, 377 $ INFO ) 378 CALL CHKXER( 'ZTREVC', INFOT, NOUT, LERR, OK ) 379 INFOT = 8 380 CALL ZTREVC( 'L', 'A', SEL, 2, A, 2, VL, 1, VR, 1, 4, M, W, RW, 381 $ INFO ) 382 CALL CHKXER( 'ZTREVC', INFOT, NOUT, LERR, OK ) 383 INFOT = 10 384 CALL ZTREVC( 'R', 'A', SEL, 2, A, 2, VL, 1, VR, 1, 4, M, W, RW, 385 $ INFO ) 386 CALL CHKXER( 'ZTREVC', INFOT, NOUT, LERR, OK ) 387 INFOT = 11 388 CALL ZTREVC( 'L', 'A', SEL, 2, A, 2, VL, 2, VR, 1, 1, M, W, RW, 389 $ INFO ) 390 CALL CHKXER( 'ZTREVC', INFOT, NOUT, LERR, OK ) 391 NT = NT + 7 392 END IF 393* 394* Print a summary line. 395* 396 IF( OK ) THEN 397 WRITE( NOUT, FMT = 9999 )PATH, NT 398 ELSE 399 WRITE( NOUT, FMT = 9998 )PATH 400 END IF 401* 402 9999 FORMAT( 1X, A3, ' routines passed the tests of the error exits', 403 $ ' (', I3, ' tests done)' ) 404 9998 FORMAT( ' *** ', A3, ' routines failed the tests of the error ', 405 $ 'exits ***' ) 406* 407 RETURN 408* 409* End of ZERRHS 410* 411 END 412