171 SUBROUTINE zhesv( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
181 INTEGER info, lda, ldb, lwork, n, nrhs
185 COMPLEX*16 a( lda, * ), b( ldb, * ), work( * )
210 lquery = ( lwork.EQ.-1 )
211 IF( .NOT.
lsame( uplo,
'U' ) .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
213 ELSE IF( n.LT.0 )
THEN
215 ELSE IF( nrhs.LT.0 )
THEN
217 ELSE IF( lda.LT.max( 1, n ) )
THEN
219 ELSE IF( ldb.LT.max( 1, n ) )
THEN
221 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
229 nb =
ilaenv( 1,
'ZHETRF', uplo, n, -1, -1, -1 )
236 CALL
xerbla(
'ZHESV ', -info )
238 ELSE IF( lquery )
THEN
244 CALL
zhetrf( uplo, n, a, lda, ipiv, work, lwork, info )
249 IF ( lwork.LT.n )
THEN
253 CALL
zhetrs( uplo, n, nrhs, a, lda, ipiv, b, ldb, info )
259 CALL
zhetrs2( uplo,n,nrhs,a,lda,ipiv,b,ldb,work,info )