Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

Help needed: call to MKL subroutine sgesv causes thread to exit with code 2

New Contributor I

I am building a Windows app that makes use of the MKL libraries that ship with Intel Fortran 18.

I have a call to the subroutine sgesv(n, nrhs, a, lda, ipiv, b, ldb, info) which causes my program to exit with the message:

The thread 0x13458 has exited with code 2 (0x2).

I have checked that the parameters that I pass to sgesv(...) are all correct. However, I am at a loss as to what to do now, since sgesv() does not pass an error message back to me (and the thread crashes before I can read 'info', which normally reports on the success or otherwise of the call).

Any help would be much appreciated!



0 Kudos
2 Replies
Black Belt

I'm afraid that there is nothing to offer unless you make a more specific and complete report. Consider this: the example sgesvx.f that is distributed with MKL also satisfies every attribute that you described, yet runs fine. Therefore, there is something specific to your invocation of SGESV that caused a problem.

Please assemble a reproducer and submit it in the MKL forum.

New Contributor I

Thanks for the reply.

I got the example sgesvx.f to work and then discovered what was going wrong with my application - I had copies of mkl_core.dll and mkl_intel_thread.dll in the same folder as my EXE. Without those DLLs present, my app runs just fine (under the debugger).

I suspect I have the wrong DLLs in the folder.

Anyway, problem solved for now.