I use ARPACK library for eigenvalues and eigenvectors computation of large complex matrices.
I have noticed that when using a complex matrix of size 1146 x 1146 and the number of requested eigenvalues is 300, the computation fails.
Interestingly, by reducing the precision with which the input matrix is represented, the eigenvalues computation does not fail anymore. Also when the number of requested values is much lower (70) the computation does not fail. When the computation fails, the error message is always the same and can be translated as:
"Error return from LAPACK eigenvalue calculation"
Could you give me a hint why this happens and how this problem could be solved ? Is there other library providing such eigenvalue computation algorithms with which I can compare our results (MATLAB and Octave use also ARPACK library and in our case the computation fails)?
Below is the relevant code used for eigenvalues computation:
while (ido != 99)
{
znaupd_(ido, bmat, n, which, k, tol, resid, p, v, n, iparam, ipntr,
workd, workl, lworkl, rwork, info);
if (info < 0)
{
std::cerr << "TestArpack::eigs:" << __LINE__ << ": Error with ARPACK routine znaupd: info = " << info << std::endl;
flag = -1;
switch(info)
{
case -8:
std::cerr << "Error return from LAPACK eigenvalue calculation" << std::endl;
break;
}
return;
}
// The TestArpack reverse communication parameter ido tells EIGS what to do
switch(ido)
{
case -1:
case 1:
zgemv_(trans, n, n, alpha, a, n, workd+2*(ipntr[0]-1), incx, beta, workd+2*(ipntr[1]-1), incy);
break;
case 2: //in this case, in zschur method, we exit from while loop
std::cout << "TestArpack::eigs: ido = 2, don't know what to do here" << std::endl;
break;
case 99:
// ARPACK has converged
break;
default:
std::cerr << "TestArpack::eigs: Unknown ido." << std::endl;
}
nbIterations++;
}// while (ido ~= 99)
nbConvergedEigs = iparam[4];
if((info != 0) && (info != 1))
{
std::cout << "TestArpack::eigs:" << __LINE__ << ": zschur method exits here" << std::endl;
}
int rvec = 1;//logical type in Fortran
char howmny = 'A';//Compute NEV Ritz vectors (zschur uses 'P')
int *select = new int[p];
for(i=0; i < p; i++)
{
select[i] = 0;//logical false
}
d = new double[2*(k+1)];//output
double *z = new double[2*n*p];//output
double sigma[] = {0.0, 0.0};
double *workev = new double[4*p];
zneupd_(rvec, howmny, select, d, z, n, sigma, workev,
bmat, n, which, k, tol, resid, p, v, n, iparam, ipntr,
workd, workl, lworkl, rwork, info);//same as for znaupd

