Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jirina
Novice
126 Views

How to reduce size of an application linking MKL statically?

Is there any way how to reduce the size of my application that uses MKL (/Qmkl:parallel), namely just dgetrf, dgetrs and dgerfs, and it is linked statically?

I was thinking about something like using the command use ..., only : ....

I am sorry if this is a silly question, I am not an expert on this.

0 Kudos
3 Replies
TimP
Black Belt
126 Views

USE .. ONLY

has no influence on the libraries.   It simply hides some declarations from the compiler. If you hide the declarations you actually use (or omit the USE MKL entirely), you simply suppress compile time checking of your MKL calls.

With conditional numerical reproducibility option, you might suppress linking support for CPU architectures other than your chosen one.  I don't see that the documentation addresses this point (as to whether it would reduce size).

Gennady_F_Intel
Moderator
126 Views

You may try to build custom dll which will contain only functions you need for your application.. You may have a look at the UsersGuide - https://software.intel.com/en-us/node/528533. see chapter "Building Custom Shared Objects" 

Evarist_F_Intel
Employee
126 Views

If the target application is *.so/*.out (or *.dll/*.exe) file then most likely nothing can be done, because static linker automatically picks only required symbols...

Reply