- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to run my tester, which tests a dll using MKL libraries.
It works great on release mode, but on debug mode it crashes and screams Access Violation.
This is my call stack, if it can help in any way:
MyTester.exe!_mkl_blas_p4m_dgcopyan() + 0x15b bytesFortran
MyTester.exe!_mkl_blas_p4m_xdgemm() + 0x32a bytesC
MyTester.exe!_mkl_blas_p4m_dgemm() + 0xb89 bytesC
MyTester.exe!_mkl_blas_p4m_dtrsm() + 0x7ff bytesC
MyTester.exe!_mkl_blas_dgemm() + 0x56 bytesC
I would like to know if you have any idea what might cause it.
Maybe something in my configurations isnt set right.
I am using libguide40.lib, MKL 9.0
Thank you in advance,
Liad.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello again,
I debugged the code that I am testing (the sources of the dll), and saw the crash happens only after more than 2500 calls to the same code.
It crashes on a call to the dgetrf(...) function, which, as I asume, calls to dgemm(...) .
I tried to locate memory leaks before the crash, but I couldn't find any.
Is there anything you know about the impementation of the dgetrf(...) that may cause the stack look like it is in my previous message?
Thank you,
Liad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Liad,
am I understand correctly what you are trying to build your own dll where MKL used?
With which MKL libraries you are linking your project?
Andrey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrey,
I am trying to test my dll.
The dlluses mkl_c.lib and libguide40.lib, from MKL 9.0.
In the dll, the following files are included:
mkl_lapack.h,
mkl_vml.h, mkl_service.hI have the dll sources so I can debug it.
I am not trying to build dll, I have a simple cpp file to allow me using the dll functions. (unit test)
It crashes inside one of the source files of the dll, exactly when I am calling the dgetrf(...) ( at the 2812th call ).
On the stack view, I see only a call to dgemm(...) and other MKL functions.
Thanks a lot,
Liad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Liad,
in general, it`s prohibited to use statical MKL libraries in your own dll. Try to rebuild your dll with mkl_c_dll.lib library.
Andrey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Ok, Thanks, I'll try it.
Meanwhile, I removed a frequent call to MKLFreeBuffers() , and changed it to one call at the ent of my tester.
For now it works fine, without any memory leaks or exceptions.
If you think there might be a problem with it - please let me know.
Thanks a lot for your help,
Liad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my best knowledge, some problems (memory leaks) in memory manager exists in MKL 9.0 and these problems were fixed in MKL 10.0 update 1.
You can try newes version of MKL.
Andrey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page