171 SUBROUTINE chesv( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
181 INTEGER info, lda, ldb, lwork, n, nrhs
185 COMPLEX 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,
'CHETRF', uplo, n, -1, -1, -1 )
236 CALL
xerbla(
'CHESV ', -info )
238 ELSE IF( lquery )
THEN
244 CALL
chetrf( uplo, n, a, lda, ipiv, work, lwork, info )
249 IF ( lwork.LT.n )
THEN
253 CALL
chetrs( uplo, n, nrhs, a, lda, ipiv, b, ldb, info )
259 CALL
chetrs2( uplo,n,nrhs,a,lda,ipiv,b,ldb,work,info )