OS: Ubuntu 18.04.2 server, kernel 4.15.0-50-generic. MKL provided by intel parallel studio xe 2019.3.
The C code reproducing the error
#include <stdlib.h>
#include <stdio.h>
#include <mkl.h>
#define N 1021
int main(){
printf("begin main\n");
double m[N],a[N*N];
lapack_int n1=N, n2=N;
for(size_t i=0;i<N*N;i++){
if(i%(N+1)==0){
a[i]=(double) rand()/RAND_MAX;
}
else {a[i]=0;}
}
lapack_int info;
printf("begin lapack\n");
info = LAPACKE_dsyevd(LAPACK_ROW_MAJOR, 'V','U', n1, a, n2, m);
printf("%d: end lapack\n", info);
return 0;
}
This code gave correct results for matrix smaller than 1020*1020, while gave Segmentation fault when N>1020. The error persists for icc, gcc, linking options as simple as -mkl for icc or full linking and compiling options as advised by linking advisor. dsteqr routine seems have similar issues.
I am new to directly using lower level routines in MKL, so there may also be some problems in my code above. Though it works well for smaller matrix.
Thanks in advance.