My program is written in C++ and I use Eigen library for the matrix operations inside it. There is a huge matrix product inside it, and the dimension is 50000*1000 and 1000*50000. So I tried to call the BLAS function from MKL library to improve the performance. Then there is segmentation error while calling the dgemm function.
Here is the code
double alpha = 1, beta = 0;
double *s1;
MKL_INT mm1 = q, nn1 = q, kk1 = ncol1;
s1 = (double *)malloc(q*q*sizeof(double));
cout << 14 << endl;
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans,mm1, nn1, kk1, alpha, V.data(), mm1, A01.data(), kk1, beta, s1, mm1);
The code works fine with small dimension. I compiles the code with:
icpc lapack.cpp generators.cpp SimpleRNG.cpp example.cpp -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -DMKL_ILP64 -o new_example.o
or
icpc lapack.cpp generators.cpp SimpleRNG.cpp example.cpp -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -o new_example.o
i.e: I tried both the LP64 interface and the ILP64 interface, but neither of them work, can anyone help me out here? I run the program on Linux server and there is plenty of memory.
Thank you very much!