|
206 | 206 | *> The QZ iteration failed. No eigenvectors have been |
207 | 207 | *> calculated, but ALPHAR(j), ALPHAI(j), and BETA(j) |
208 | 208 | *> should be correct for j=INFO+1,...,N. |
209 | | -*> > N: =N+1: other than QZ iteration failed in SHGEQZ. |
| 209 | +*> > N: =N+1: other than QZ iteration failed in SLAQZ0. |
210 | 210 | *> =N+2: error return from STGEVC. |
211 | 211 | *> \endverbatim |
212 | 212 | * |
@@ -260,7 +260,7 @@ SUBROUTINE SGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI, |
260 | 260 | LOGICAL LDUMMA( 1 ) |
261 | 261 | * .. |
262 | 262 | * .. External Subroutines .. |
263 | | - EXTERNAL SGEQRF, SGGBAK, SGGBAL, SGGHRD, SHGEQZ, SLABAD, |
| 263 | + EXTERNAL SGEQRF, SGGBAK, SGGBAL, SGGHD3, SLAQZ0, SLABAD, |
264 | 264 | $ SLACPY, SLASCL, SLASET, SORGQR, SORMQR, STGEVC, |
265 | 265 | $ XERBLA |
266 | 266 | * .. |
@@ -330,13 +330,21 @@ SUBROUTINE SGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI, |
330 | 330 | * |
331 | 331 | IF( INFO.EQ.0 ) THEN |
332 | 332 | MINWRK = MAX( 1, 8*N ) |
333 | | - MAXWRK = MAX( 1, N*( 7 + |
| 333 | +* |
| 334 | + MAXWRK = MAX( MINWRK, N*( 3 + |
334 | 335 | $ ILAENV( 1, 'SGEQRF', ' ', N, 1, N, 0 ) ) ) |
335 | | - MAXWRK = MAX( MAXWRK, N*( 7 + |
| 336 | + MAXWRK = MAX( MAXWRK, N*( 3 + |
336 | 337 | $ ILAENV( 1, 'SORMQR', ' ', N, 1, N, 0 ) ) ) |
337 | 338 | IF( ILVL ) THEN |
338 | | - MAXWRK = MAX( MAXWRK, N*( 7 + |
| 339 | + MAXWRK = MAX( MAXWRK, N*( 3 + |
339 | 340 | $ ILAENV( 1, 'SORGQR', ' ', N, 1, N, -1 ) ) ) |
| 341 | + END IF |
| 342 | + IF( ILV ) THEN |
| 343 | + MAXWRK = MAX( MAXWRK, N*( 2 + 6 * |
| 344 | + $ ILAENV( 1, 'SGGHD3', ' ', N, 1, N, 0 ) ) ) |
| 345 | + ELSE |
| 346 | + MAXWRK = MAX( MAXWRK, 6*N * |
| 347 | + $ ILAENV( 1, 'SGGHD3', ' ', N, 1, N, 0 ) ) |
340 | 348 | END IF |
341 | 349 | WORK( 1 ) = MAXWRK |
342 | 350 | * |
@@ -448,26 +456,28 @@ SUBROUTINE SGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI, |
448 | 456 | * |
449 | 457 | * Eigenvectors requested -- work on whole matrix. |
450 | 458 | * |
451 | | - CALL SGGHRD( JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, VL, |
452 | | - $ LDVL, VR, LDVR, IERR ) |
| 459 | + IWRK = ITAU |
| 460 | + CALL SGGHD3( JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, VL, |
| 461 | + $ LDVL, VR, LDVR, WORK( IWRK ), LWORK+1-IWRK, IERR ) |
453 | 462 | ELSE |
454 | | - CALL SGGHRD( 'N', 'N', IROWS, 1, IROWS, A( ILO, ILO ), LDA, |
455 | | - $ B( ILO, ILO ), LDB, VL, LDVL, VR, LDVR, IERR ) |
| 463 | + IWRK = 1 |
| 464 | + CALL SGGHD3( 'N', 'N', IROWS, 1, IROWS, A( ILO, ILO ), LDA, |
| 465 | + $ B( ILO, ILO ), LDB, VL, LDVL, VR, LDVR, |
| 466 | + $ WORK( IWRK ), LWORK+1-IWRK, IERR ) |
456 | 467 | END IF |
457 | 468 | * |
458 | 469 | * Perform QZ algorithm (Compute eigenvalues, and optionally, the |
459 | 470 | * Schur forms and Schur vectors) |
460 | 471 | * (Workspace: need N) |
461 | 472 | * |
462 | | - IWRK = ITAU |
463 | 473 | IF( ILV ) THEN |
464 | 474 | CHTEMP = 'S' |
465 | 475 | ELSE |
466 | 476 | CHTEMP = 'E' |
467 | 477 | END IF |
468 | | - CALL SHGEQZ( CHTEMP, JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, |
| 478 | + CALL SLAQZ0( CHTEMP, JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, |
469 | 479 | $ ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, |
470 | | - $ WORK( IWRK ), LWORK+1-IWRK, IERR ) |
| 480 | + $ WORK( IWRK ), LWORK+1-IWRK, 0, IERR ) |
471 | 481 | IF( IERR.NE.0 ) THEN |
472 | 482 | IF( IERR.GT.0 .AND. IERR.LE.N ) THEN |
473 | 483 | INFO = IERR |
|
0 commit comments