- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
when building an executable or dynamic library that uses MKL functions, all I need to do is specify -mkl=sequential on the compiler and linker command line. icc will automatically do everything that is required (add include-directions, pull in libraries, ...). That is nice and easy.
Now I want to build a static library (.a archive). The objects in this library invoke functions from MKL so I want to pack the required MKL objects into the static library as well so that I have only one static library that contains anything -- and preferably only those MKL objects that are actually required. I know how to do that by explicitly collecting the required MKL objects into the static library. But this feels cumbersome and also a little error prone. Is there anything similar to -mkl=sequential for this scenario? Would using xiar instead of ar help in any way?
I looked at https://software.intel.com/en-us/node/528519 (the linking examples) but nothing seemed related to what I am trying to do.
Thanks a lot,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
There is no an easy way to do that. Probably one can write some sort of script and collect required objects by analyzing U-symbols and finding objects with corresponding T-symbols.
Though, if dynamic library with the same property (i.e. it contains only needed functions from MKL) suites you -- please take a look at MKL custom dll builder ($MKLROOT/tools/builder or https://software.intel.com/en-us/node/528363).
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
There is no an easy way to do that. Probably one can write some sort of script and collect required objects by analyzing U-symbols and finding objects with corresponding T-symbols.
Though, if dynamic library with the same property (i.e. it contains only needed functions from MKL) suites you -- please take a look at MKL custom dll builder ($MKLROOT/tools/builder or https://software.intel.com/en-us/node/528363).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Evarist,
thanks for your reply. The analysis of U and T symbols is exactly what we are doing right now. We definitely need a static library, a dynamic one will not do. So it looks like we are stuck with more or less manual selection of the object files.
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just one additional idea -- "-Map" linker option may help you a little (put it in custom dll builder or your initial application and parse the output for required objects)...
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page