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

dfeast_scsrev problem

Sina_S_
Beginner
632 Views

Hi Everybody
I have a problem regarding eigenvalue calculations for my system with dfeast_scsrev
as you know this function supposed to solve standard eigenvalue problem for sparse matrices.
My code was working fine previously but since I changed to bigger system(65536x65536) I have a segmentation fault. when I run my code with gdb I will see that the memory issue is regarding function mkl_feast_dfeast_srci () which I do not call it in my program.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff54aa08a in mkl_feast_dfeast_srci () from /opt/apps/intel/2016-2/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_core.so

this function belongs to Reverse Communication Interface which I am not using directly. Does any of you have any experience?
Thank you in advance.
Regards,

0 Kudos
6 Replies
Gennady_F_Intel
Moderator
632 Views

Sina, please try to link with ILP64 library and check how it will work. Pls see in MKL User's Guide how to compile and link this case.

0 Kudos
Sina_S_
Beginner
632 Views

thanks gennady,

I was simply running my code with this command

icpc -O3  -mkl -std=c++11 main.cpp -o CSR_Network
and i also tried with

icpc -O3 -ILP64 -mkl -std=c++11 main.cpp -o CSR_Network
but still i have the same problem.

 

 

0 Kudos
Gennady_F_Intel
Moderator
632 Views

have you read the User's Guide to see how compile ILP64 example? pls have a look at, for example, this page https://software.intel.com/en-us/node/528524. pls pay attenntion you need add additional compler's option and changed the linking line   

0 Kudos
Sina_S_
Beginner
632 Views

Hi again
Thanks for your information.
from intel mkl link line advisor I learned how to link with ILP64.
https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor
this time the segmentation fault is like this

Program received signal SIGSEGV, Segmentation fault.
0x000000000040f23a in __intel_avx_rep_memset ().
Best,
 

0 Kudos
Irina_S_Intel
Employee
632 Views

Hi Sina,

dfeast_scsrev calls rci interface internally, so that's expected.

Could you please sent me a small reproducer on how you set feast parameters and call dfeast_scsrev? Is your matrix 1-based?

Best regards,

Irina

0 Kudos
Sina_S_
Beginner
632 Views

Hi Irina
Linking with ILP64 as Gennady mentioned was a good tip but I had another problem which I just found out.
when I was preparing my pointer arrays for FEAST I was initiallizing like this

double    *   E =  (double*)malloc(N*sizeof(double)) ;      /* Eigenvalues */
double    *   X =  (double*)malloc(N*N*sizeof(double));       /* Eigenvectors */
double    *  res = (double*)malloc(N*sizeof(double)) ;      /* Residual */

which is devil, because when you go for very big matrices you will face memory issues.
Some one can replace this N by M which is the number of eigenvalues(for sure approximately,because nobody knows exactly in advance) you want to calculate in corresponding interval.
Now my code is working fine.
Best,
Sina

0 Kudos
Reply