Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?hesv_rook

Computes the solution to the system of linear equations for Hermitian matrices using the bounded Bunch-Kaufman diagonal pivoting method.

Syntax

call chesv_rook( uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info )

call zhesv_rook( uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info )

call hesv_rook( a, b [,uplo] [,ipiv] [,info] )

Include Files

  • mkl.fi, lapack.f90

Description

The routine solves for X the complex system of linear equations A*X = B, where A is an n-by-n Hermitian matrix, and X and B are n-by-nrhs matrices.

The bounded Bunch-Kaufman ("rook") diagonal pivoting method is used to factor A as

A = U*D*UH if uplo = 'U', or

A = L*D*LH if uplo = 'L',

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.

hetrf_rook is called to compute the factorization of a complex Hermition matrix A using the bounded Bunch-Kaufman ("rook") diagonal pivoting method.

The factored form of A is then used to solve the system of equations A*X = B by calling ?HETRS_ROOK, which uses BLAS level 2 routines.

Input Parameters

uplo

CHARACTER*1. Must be 'U' or 'L'.

Indicates whether the upper or lower triangular part of A is stored:

If uplo = 'U', the array a stores the upper triangular part of the matrix A.

If uplo = 'L', the array a stores the lower triangular part of the matrix A.

n

INTEGER. The number of linear equations, which is the order of matrix A; n 0.

nrhs

INTEGER. The number of right-hand sides, the number of columns in B; nrhs 0.

a, b, work

COMPLEX for chesv_rook

COMPLEX*16 for zhesv_rook.

Arrays: a(size lda by *), b(size ldb by *), work(*).

The array a contains the Hermitian matrix A. If uplo = 'U', the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix A, and the strictly lower triangular part of a is not referenced. If uplo = 'L', the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix A, and the strictly upper triangular part of a is not referenced. The second dimension of a must be at least max(1, n).

The array b contains the n-by-nrhs right hand side matrix B. The second dimension of b must be at least max(1,nrhs).

work is a workspace array, dimension at least max(1,lwork).

lda

INTEGER. The leading dimension of a; lda max(1, n).

ldb

INTEGER. The leading dimension of b; ldb max(1, n).

lwork

INTEGER. The size of the work array (lwork 1).

If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla. See Application Notes below for details and for the suggested value of lwork.

Output Parameters

a

If info = 0, a is overwritten by the block-diagonal matrix D and the multipliers used to obtain the factor U (or L) from the factorization of A as computed by hetrf_rook.

b

If info = 0, b is overwritten by the n-by-nrhs solution matrix X.

ipiv

INTEGER.

Array, size at least max(1, n). Contains details of the interchanges and the block structure of D, as determined by ?hetrf_rook.

  • If uplo = 'U':

    If ipiv(k) > 0, rows and columns k and ipiv(k) were interchanged and Dk, k is a 1-by-1 diagonal block.

    If ipiv(k) < 0 and ipiv(k - 1) < 0, rows and columns k and -ipiv(k) were interchanged, rows and columns k - 1 and -ipiv(k - 1) were interchanged, and Dk - 1:k, k - 1:k is a 2-by-2 diagonal block.

  • If uplo = 'L':

    If ipiv(k) > 0, rows and columns k and ipiv(k) were interchanged and Dk, k is a 1-by-1 diagonal block.

    If ipiv(k) < 0 and ipiv(k + 1) < 0, rows and columns k and -ipiv(k) were interchanged, rows and columns k + 1 and -ipiv(k + 1) were interchanged, and Dk:k + 1, k:k + 1 is a 2-by-2 diagonal block.

work(1)

If info = 0, on exit work(1) contains the minimum value of lwork required for optimum performance. Use this lwork for subsequent runs.

info

INTEGER. If info = 0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.

If info = i, Dii is 0. The factorization has been completed, but D is exactly singular, so the solution could not be computed.

LAPACK 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see LAPACK 95 Interface Conventions.

Specific details for the routine hesv_rook interface are as follows:

a

Holds the matrix A of size (n,n).

b

Holds the matrix B of size (n,nrhs).

ipiv

Holds the vector of length n.

uplo

Must be 'U' or 'L'. The default value is 'U'.