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

dfeast_scsrev problem

Sina_S_
Débutant
2 086 Visites

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 Compliments
6 Réponses
Gennady_F_Intel
Modérateur
2 086 Visites

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 Compliments
Sina_S_
Débutant
2 086 Visites

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 Compliments
Gennady_F_Intel
Modérateur
2 086 Visites

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 Compliments
Sina_S_
Débutant
2 086 Visites

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 Compliments
Irina_S_Intel
Employé
2 086 Visites

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 Compliments
Sina_S_
Débutant
2 086 Visites

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 Compliments
Répondre