I noticed that the LAPACK function DGGEV does not converge for this pair of

matrices:

A = [0 0 1; 0 1 0; 1 0 0];

B = [2 0 0; 0 0 1; 0 1 0];

This is a C program I used (linking with CLAPACK ver. 3.0).

int main(void)

{

int i, j;

char jobvl = 'N', jobvr = 'N';

integer nn = 3, one = 1, lwork, info;

doublereal tmp, *work;

doublereal VR, VL, alphar[3], alphai[3], beta[3];

doublereal pA[9] = {0., 0., 1., 0., 1., 0., 1., 0., 0.};

doublereal pB[9] = {2., 0., 0., 0., 0., 1., 0., 1., 0.};

lwork = -1; /* query */

dggev_(&jobvl, &jobvr, &nn, pA, &nn, pB, &nn,

alphar, alphai, beta, &VL, &one, &VR, &one,

&tmp, &lwork, &info);

lwork = (integer) tmp;

printf("\ndggev: lwork = %ld\n", lwork);

work = (doublereal *) malloc(sizeof(doublereal)*lwork);

dggev_(&jobvl, &jobvr, &nn, pA, &nn, pB, &nn,

alphar, alphai, beta, &VL, &one, &VR, &one,

work, &lwork, &info);

printf("dggev: info = %ld\n", info);

return 0;

}

The program returns "info = 3". This matrix pair seems to be simple, and it

is easy to compute eigenvalues of the generalized eigenvalue problem

A.x = s*B.x

I get three eigenvalues (one real and one conjugate pair):

0.793701

-0.39685 - 0.687365*i

-0.39685 + 0.687365*i

Therefore it is interesting to know why DGGEV does not converge.

Zbigniew