I ‘m trying to solve eigenvalues using zfeast_hcsrev. I wrote a simple test file and just gave a simple diagonal matrix but I got info code=-1. I compiled with the command “icpx -qmkl=sequential test.cpp” on wsl2 with mkl version ” 2023.1.0″. And Here is my test file.
#include "mkl.h"
MKL_INT main(void) {
char uplo = 'F';
MKL_INT n = 8;
double emin = 2.0;
double emax = 5.0;
MKL_INT m0 = 5;
MKL_INT info;
double epsout;
MKL_INT loop, m;
double *e = new double[m0];
MKL_Complex16 *x = new MKL_Complex16[n * m0];
double *res = new double[m0];
MKL_INT rowptr[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
MKL_INT colidx[8] = {0, 1, 2, 3, 4, 5, 6, 7};
MKL_Complex16 data[8] = {{1.0, 0.0}, {1.9, 0.0}, {3.0, 0.0}, {4.0, 0.0},
{5.2, 0.0}, {6.0, 0.0}, {7.0, 0.0}, {8.0, 0.0}};
MKL_INT fpm[128];
feastinit(fpm);
fpm[0] = 1;
zfeast_hcsrev(&uplo, &n, data, rowptr, colidx, fpm, &epsout, &loop, &emin,
&emax, &m0, e, x, &m, res, &info);
return 0;
}
Hope some nice people can tell me where is the bug.
New contributor
done is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.