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

dfeast_scsrgv and zfeast_hcsrgv Segmentation fault Error

yera__rolando
Beginner
2,509 Views

Hello,

I am trying solve a generalized eigenvalues problem Ax = λBx by means of dfeast_scsrgv, but, I get SIGSEV error, I test the individual matrices A and B with dfeast_scsrev and all works fine, so I think that is not a problem of data representation.

Attached goes a code example for the problem described.

 

pd: The hermitian version zfeast_hcsrgv has the same issue. Sorry for the english.

 

0 Kudos
16 Replies
Gennady_F_Intel
Moderator
2,509 Views

which version of mkl did you try?

0 Kudos
yera__rolando
Beginner
2,509 Views

2019 update 4, in Linux, I try with both ICC and GCC compilers.

0 Kudos
Gennady_F_Intel
Moderator
2,509 Views

the fix of the issue available in MKL 2020.1.

0 Kudos
Dan31
Beginner
1,644 Views

I would like to reopen this issue as I am having the same problem.

You can use the very same example as given in this thread's initial post.

My OneAPI version is:

ls -l /opt/intel/oneapi/mkl
total 4
drwxr-xr-x 9 root root 4096 Oct 27 22:15 2025.0
lrwxrwxrwx 1 root root 6 Nov 25 12:29 latest -> 2025.0

 

0 Kudos
Aleksandra_K
Moderator
1,591 Views

Hi,


Could you please let me know which compiler you are using? This will help me reproduce the issue you're facing.


Thanks and regards,

Aleksandra


0 Kudos
Dan31
Beginner
1,493 Views

Thanks Aleksandra for your help and sorry for not replying sooner.

Here is my output:

/opt/intel/oneapi/compiler/latest/bin/icx --version
Intel(R) oneAPI DPC++/C++ Compiler 2025.0.0 (2025.0.0.20241008)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2025.0/bin/compiler
Configuration file: /opt/intel/oneapi/compiler/2025.0/bin/compiler/../icx.cfg

 

Does this help?

0 Kudos
Dan31
Beginner
1,485 Views

@Aleksandra_KMy apologies, it seems that dfeast fails only in my program's environment... it runs when i compile it manually.

Will investigate and reply... please do not waste time on this for now.

 

Thanks,

Daniel

0 Kudos
Aleksandra_K
Moderator
1,475 Views

Hi Daniel,

 

Thank you for the update. I also checked your example manually and it compiled correctly with icpx and the new MKL 2025.0 (there was a small mistake in calling the last function - after m0, the next argument should have been csr_gv_eigenvalues, but it was csr_gv_res, but you probably know about it).


Please let me know if there is something else I can help you in this topic, or confirm that I can close the issue.

 

Best regards,

Aleksandra


0 Kudos
Dan31
Beginner
1,364 Views

OK, I think I got it pin pointed!

I have a task that needs PARDISO call in order to solve linear system of equations first, then I have FEAST call to solve generalized eigenvalue problem.

I need to have them in threads in order to monitor progress.

Segmentation fault occurs in FEAST call if PARDISO call was in thread. If I call PARDISO directly, there is no problem.

Please check the example I provided in a hope that you can reproduce it also.

Problem happens with both gcc and intel compilers (Linux).

 

0 Kudos
Aleksandra_K
Moderator
1,293 Views

Hi Daniel,


Could you share more details on how you ran the code and the error you encountered?  I really want to reproduce it but so far I can't get that error.


Thanks,

Aleksandra


0 Kudos
Dan31
Beginner
1,282 Views

Hello Aleksandra,

 

here are the steps:

- download and extract main.zip
- open terminal in folder where you extracted main.cpp file
- start intel MKL development environment:
source /opt/intel/oneapi/setvars.sh
- compile main.cpp file into executable:
icpx -Wall -g -I/opt/intel/oneapi/mkl/latest/include -c main.cpp -o main.o
icpx -o main main.o -Wl,--start-group /opt/intel/oneapi/compiler/latest/lib/libiomp5.a /opt/intel/oneapi/mkl/latest/lib/libmkl_core.a /opt/intel/oneapi/mkl/latest/lib/libmkl_gnu_thread.a /opt/intel/oneapi/mkl/latest/lib/libmkl_intel_lp64.a -Wl,--no-as-needed -Wl,--end-group -ldl
- run executable:
./main
- Segmentation fault

 

I did find that using direct compilation:

icpx -I/opt/intel/oneapi/mkl/latest/include -L/opt/intel/oneapi/mkl/latest/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl main.cpp -o main

will yield runnable executable... now I am trying to figure out the difference as I need separate compile and link times as I am using codeblocks IDE... perhaps you see right away what is wrong with my link line?

0 Kudos
Aleksandra_K
Moderator
1,274 Views

Please check with this short linking:


icpx main.cpp -o main -I${MKLROOT}/include -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core


Does it work or do you get errors?


0 Kudos
Dan31
Beginner
1,234 Views

Thank you Aleksandra!

 

It works!

I guess it was libmkl_gnu_thread.a conflict that caused problems in my case... anyway I abandoned linking with static libraries.

 

Thanks,

Daniel

0 Kudos
Aleksandra_K
Moderator
1,226 Views

Hi Daniel,


Great to hear that! Is there something else I can help you with this topic or can I close the issue?


Regards,

Aleksandra


0 Kudos
Dan31
Beginner
1,225 Views

No, that's it. Thank you, you can close the issue.

0 Kudos
Reply