diff options
author | julie <julielangou@users.noreply.github.com> | 2011-03-04 20:44:21 +0000 |
---|---|---|
committer | julie <julielangou@users.noreply.github.com> | 2011-03-04 20:44:21 +0000 |
commit | b860077bc7317de1943efb058df48de0bddcab7c (patch) | |
tree | f27c4ee3c1a474f7b6966266a87ccb408a6a6744 /SRC/dsytri2.f | |
parent | 472bfdccf7aa2fef03d010e8f60644cf90383e9d (diff) | |
download | lapack-b860077bc7317de1943efb058df48de0bddcab7c.tar.gz lapack-b860077bc7317de1943efb058df48de0bddcab7c.tar.bz2 lapack-b860077bc7317de1943efb058df48de0bddcab7c.zip |
Correct bug 0076 reported by Intel Team on lapack forum
Problem in ?(sy/he)tri2 was found.
For matrices with small N subroutine pass parameter NBMAX to ?(sy/he)tri2x which could be large than N.
In test for this functionality this is hide. Local test subroutine ilaenv.f pass proper values of NB. But if use ordinary ilaenv we will get mistake.
If we implemented
IF ( NBMAX .GE. N ) THEN
MINSIZE = N
ELSE
MINSIZE = (N+NBMAX+1)*(NBMAX+3)
END IF
and will call
IF( NBMAX .GE. N ) THEN
CALL SSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
ELSE
CALL SSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NBMAX, INFO )
END IF
the problem will be solved.
Some other minor changes on workspace query.
Diffstat (limited to 'SRC/dsytri2.f')
-rw-r--r-- | SRC/dsytri2.f | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/SRC/dsytri2.f b/SRC/dsytri2.f index ed32d543..6e1fa5bd 100644 --- a/SRC/dsytri2.f +++ b/SRC/dsytri2.f @@ -7,6 +7,7 @@ * * -- Written by Julie Langou of the Univ. of TN -- * +* @generated d * .. Scalar Arguments .. CHARACTER UPLO INTEGER INFO, LDA, LWORK, N @@ -19,7 +20,7 @@ * Purpose * ======= * -* DSYTRI2 computes the inverse of a real symmetric indefinite matrix +* DSYTRI2 computes the inverse of a DOUBLE PRECISION hermitian indefinite matrix * A using the factorization A = U*D*U**T or A = L*D*L**T computed by * DSYTRF. DSYTRI2 sets the LEADING DIMENSION of the workspace * before calling DSYTRI2X that actually computes the inverse. @@ -94,7 +95,11 @@ LQUERY = ( LWORK.EQ.-1 ) * Get blocksize NBMAX = ILAENV( 1, 'DSYTRF', UPLO, N, -1, -1, -1 ) - MINSIZE = (N+NBMAX+1)*(NBMAX+3) + IF ( NBMAX .GE. N ) THEN + MINSIZE = N + ELSE + MINSIZE = (N+NBMAX+1)*(NBMAX+3) + END IF * IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -1 @@ -113,13 +118,17 @@ CALL XERBLA( 'DSYTRI2', -INFO ) RETURN ELSE IF( LQUERY ) THEN - WORK(1)=(N+NBMAX+1)*(NBMAX+3) + WORK(1)=MINSIZE RETURN END IF IF( N.EQ.0 ) $ RETURN - CALL DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NBMAX, INFO ) + IF( NBMAX .GE. N ) THEN + CALL DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO ) + ELSE + CALL DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NBMAX, INFO ) + END IF RETURN * * End of DSYTRI2 |