I have encountered a segfault problem when using certain routines.
I have a real matrix of doubles that is arbitrary and non-symmetric. I need to compute eigen values.
I have tried using dgebal => dgehrd => dhseqr, dgeev, dgeevx, dgees, dgeesx.
The problem is the same for all the routines. I connect to the 64 bit MKL fortran77 interface via P/Invoke in C#. When I force MKL to use a maximum of one thread there is no issue. I can get eigen values for any size of matrix. I have tested 500x500, 5000x5000, 20000x20000.
Single threaded works fine. However, if I set max threads to two or greater then fortran throws a segfault. I am using the native 64 bit interface ILP64 and passing 64 bit integers and chars as single byte standard ascii values.
This works fine on a single thread...
If I use the dynamic default then it works fine up to 127x127 but then fails for matrices 128x128 or greater. I presume that MKL will run single threaded below 1Mb and then using more than one thread in dynamic mode above that.
This just happens to be 1Mb, which is the stack size for 64 bit c#. Wherefore, I have tested if this is an issue with running out of stack space by ring fencing the call in c# in a thread with a 300Mb stack and with all objects sitting in unmanaged memory and passing pointers..
This again works fine, when MKL is forced to be single threaded but still fails when threads are two or greater, or when the default setup with dynamic enabled is used it works up to 127x127 and then fails for 128x128 or greater... the change in stack size from 1Mb to 300Mb had no impact.. Hence, I am pretty sure it is not a stack issue..
Any ideas, explanation or solution..?
Need a little help.. I have run out of ideas... genuine intel with AVX2 instructions.. more than able memory.. 10 cores.. I make the calls through the Intel Single Dynamic Library.. I have not compiled it but using it as is from the oneAPI download (mkl_rt.2.dll).
Thanks for posting on Intel Communities.
Could you please get back to us with screenshots of the observations, the project file, and steps to reproduce(if any) so that it helps us triage the issue better.
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.