- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have had to switch from dynamically linking to MKL to static linking because of a conflict between our MKL version and various versions of Matlab when our main DLL module is called from a Matlab MEX file.
My understanding ( for 9.1) is that all I (should) have to do is link against mkl_c.lib instead of mkl_c_dll.lib and then no MKL DLL's at all are then required apart from libguide40.dll.
Yet I still see mkl_p4p.dll being loaded dynamically at run-time.
My understanding ( for 9.1) is that all I (should) have to do is link against mkl_c.lib instead of mkl_c_dll.lib and then no MKL DLL's at all are then required apart from libguide40.dll.
Yet I still see mkl_p4p.dll being loaded dynamically at run-time.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right, for switching from dynamical MKL usage to statical usage you need to link with mkl_c.lib instead of mkl_c_dll.lib. Looks strange what mkl_p4p.dll still loading. Maybe other Matlab components use this library?
And I have question for you: how you determine what mkl_p4p.dll is loaded?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So it is clear mkl_p4p.dll should not be loaded and I need to find out why.
I am running in a standalone mode (without Matlab) under the Visual C++ 2005 debugger so I can see what DLL's are loaded when. When the application performs my first matrix operation that calls perhaps a lapack routine ( not sure as it is buried way down in a class library) , I see the mkl_p4p.dll from the MKL BIN directory get loaded dynamically( MKLin is in the PATH)
My link line includes mkl_c.lib mkl_lapack.lib mkl_solver.lib
I am running in a standalone mode (without Matlab) under the Visual C++ 2005 debugger so I can see what DLL's are loaded when. When the application performs my first matrix operation that calls perhaps a lapack routine ( not sure as it is buried way down in a class library) , I see the mkl_p4p.dll from the MKL BIN directory get loaded dynamically( MKLin is in the PATH)
My link line includes mkl_c.lib mkl_lapack.lib mkl_solver.lib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have found the issue. Including mkl_lapack.lib in the link line causes the problem. If I remove that then the mkl_p4p.DLL is not loaded.

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