diff options
author | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2012-10-11 18:19:31 +0000 |
---|---|---|
committer | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2012-10-11 18:19:31 +0000 |
commit | 5dbf71b11b4901dd61b5d820d1c937a2ec4d0fcf (patch) | |
tree | 950ea0d94918849ef1bf8d4f087a1467509ef11a /SRC/zhsein.f | |
parent | 988230771a6f190afe5ea34459de8468d0105a7f (diff) | |
download | lapack-5dbf71b11b4901dd61b5d820d1c937a2ec4d0fcf.tar.gz lapack-5dbf71b11b4901dd61b5d820d1c937a2ec4d0fcf.tar.bz2 lapack-5dbf71b11b4901dd61b5d820d1c937a2ec4d0fcf.zip |
* added check for NaN after the norm of each block of H is computed
* if NaN is detected, returns with INFO=-6 (H is the 6th parameter)
* fixes problem found by Alexander Kobotov at Intel where a NaN in H can cause an infinite loop:
http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=3928
Diffstat (limited to 'SRC/zhsein.f')
-rw-r--r-- | SRC/zhsein.f | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/SRC/zhsein.f b/SRC/zhsein.f index 6c7173f1..059f3663 100644 --- a/SRC/zhsein.f +++ b/SRC/zhsein.f @@ -104,6 +104,7 @@ *> \verbatim *> H is COMPLEX*16 array, dimension (LDH,N) *> The upper Hessenberg matrix H. +*> If a NaN is detected in H, the routine will return with INFO=-6. *> \endverbatim *> *> \param[in] LDH @@ -276,9 +277,9 @@ COMPLEX*16 CDUM, WK * .. * .. External Functions .. - LOGICAL LSAME + LOGICAL LSAME, DISNAN DOUBLE PRECISION DLAMCH, ZLANHS - EXTERNAL LSAME, DLAMCH, ZLANHS + EXTERNAL LSAME, DLAMCH, ZLANHS, DISNAN * .. * .. External Subroutines .. EXTERNAL XERBLA, ZLAEIN @@ -399,7 +400,10 @@ * has not ben computed before. * HNORM = ZLANHS( 'I', KR-KL+1, H( KL, KL ), LDH, RWORK ) - IF( HNORM.GT.RZERO ) THEN + IF( DISNAN( HNORM ) ) THEN + INFO = -6 + RETURN + ELSE IF( HNORM.GT.RZERO ) THEN EPS3 = HNORM*ULP ELSE EPS3 = SMLNUM |