Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7220 ディスカッション

MKL library, dsyegv procedure failes when matrix size > 80

Vladimir_D_
ビギナー
950件の閲覧回数

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 件の賞賛
4 返答(返信)
Tyler_T_Intel
従業員
950件の閲覧回数

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?"

Vladimir_D_
ビギナー
950件の閲覧回数

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

Michael_C_Intel4
従業員
950件の閲覧回数

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.

Michael_C_Intel4
従業員
950件の閲覧回数

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.

返信