[Lapack] Generalized eigenvalue problem: what if B is not upper triangul
From: James Demmel
Date: Thu, 01 Nov 2007 06:02:28 -0700
Please use one of the driver routines cggev (for eigenvectors)
or cgges (just for the generalized Schur form). There are
also "expert" versions of these routines (cggevx and cggesx)
that compute condition numbers (useful for error bounds).
Francesco Poli wrote:
I am a CFD researcher at the University of Florence, Italy.
I am trying to learn solving eigenvalue problems of the form
A*x = lambda*B*x
where A and B are n*n complex matrices, and x is the right eigenvector
corresponding to the eigenvalue lambda.
I'm writing Fortran77 code and linking against LAPACK, on a Debian
GNU/Linux x86 machine.
I'm using LAPACK version 3.0.20000531a and g77 version 3.3.5:
it seems that my problem is a generalized nonsymmetric eigenproblem.
The first step to solve it, IIUC, is an Hessenberg reduction with
So I checked the CGGHRD manpage and found out that that subroutine
assumes B is an upper triangular matrix:
| CGGHRD - reduce a pair of complex matrices (A,B) to generalized
| upper Hessenberg form using unitary transformations, where A is a
| general matrix and B is upper triangular
This sounds kind of strange, because that very matrix (B) is going to be
transformed to an upper triangular matrix (T), while the other one (A)
is going to be transformed to an upper Hessenberg one (H).
Moreover, while the manpage mentions this constraint, I failed to find
any warning about this in the LAPACK users' guide:
In order to investigate further I wrote a little program that reads two
matrices (A and B) and invokes CGGHRD to perform an Hessenberg
reduction. I wanted to check whether the reduction is performed
correctly for non triangular B matrices.
The program is attached, along with its input data file and
As can be seen, CGGHRD seems to ignore any subdiagonal element in B,
treating B as upper triangular no matter what.
Now the question is: what if my problem has a non-triangular B matrix?
Am I using the wrong subroutine(s)?
Should I preprocess A and B somehow?
I searched LAPACK documentation, but failed to find any relevant hint.
Could you please help?
Thanks for your time (and for developing such a useful library!).
Lapack mailing list