Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6977 Discussions

MKL library, dsyegv procedure failes when matrix size > 80

Vladimir_D_
Beginner
393 Views

Im using the evaluation MKL library, dsyegv procedure

The following code:

char jobz = 'N'; char uplo = 'U';

int n = 81;//80-OK

int lda = n;

int lwork = 2*n+1;

int liwork = 1;

int info;

double* a = new double[n*n];

double* work = new double[lwork];

int* iwork = new int[liwork];

double* w = new double;

for (int j=0; j

for (int i=0; i

a[i+j*n] = (i==j) ? 1 : 0.1;

dsyevd(&jobz, &uplo, &n, a, &lda, w, work, &lwork, iwork, &liwork, &info);

works successfully when n <= 80.

When n is 81 and up, the dsyevd procedure fails with the messge: access violated

Could you help to solve the issuer? We are going to purchase the library.

Vlad Dubitski

0 Kudos
4 Replies
Tyler_T_Intel
Employee
393 Views

See this post 30249758for possible work-around.

"I do see a known issue regarding the DSYTRD function (used by DSYEV). If the problem you are seeing is related you should be able to work around this by increasingthe size of your work array to 6*n. Could you give that a try?"

0 Kudos
Vladimir_D_
Beginner
393 Views

Thanks a lot. Todd,

your medicine helped well.

Meanwile, I got the similar crach by using

DGEMM(&transa, &transb, &m, &n, &k, α, a, &lda, b, &ldb, β, c, &ldc);

where

double* a = new double[m*k*multipl];

double* b = new double[k*n*multipl];

double* c = new double[m*n*multipl];

with multipl = 1.

I solved (?) the problem when used multipl=2

Do you have any comments?

Thank you

Vlad

0 Kudos
Michael_C_Intel4
Employee
393 Views

Dear Vlad,

What MKL version do you use?

There's a known issue with some MKL versions (10.0 - 10.0 Update2) when dsyevd (or any dsyev*) uses a low workspace. Please try to increase lwork amount by the factor of the number of threads you run in, or just request the recommended workspace passing lwork=-1 to dsyevd prior to workspace allocation, allocate workspace recommended and run the routine again.

Michael.

0 Kudos
Michael_C_Intel4
Employee
393 Views

Sorry, I didn't noticed Todd had already helped you.

Could you write down how you initialize dgemm parameters as you did it for dsyevd?

Michael.

0 Kudos
Reply