- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear mkl developer:
Hi, 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. I have tried to find the problem but
failed. Hope you can give me some suggestions
#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;
}
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The index of mkl csr matrix start with 1 not 0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Wangdong,
Good to know that you found the root cause in your test code. Thanks for sharing your observation here so that all other community users are aware of it and avoid future misuses.
Regards,
Ruqiu

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page