- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, I have a CMake based crossplatform application which uses MKL, and builds on Windows/OSX and Linux. On the latter, I have one link problem left:
/opt/intel/mkl/lib/ia32/libmkl_core.a(_def_dfti_create_srmd.o): In function `commit':
../../../../dft/kernel/0ref/dfti_create_srmd.c:(.text+0x15): undefined reference to `mkl_dft_commit_node_s_r2c_md_omp'
/opt/intel/mkl/lib/ia32/libmkl_core.a(_def_dfti_create_srmd.o): In function `commit':../../../../dft/kernel/0ref/dfti_create_srmd.c:(.text+0x15): undefined reference to `mkl_dft_commit_node_s_r2c_md_omp'[...snip...]
What library am I missing ? The libraries linked to are (output from the FindMKL.cmake script):
-- MKL_LIBRARIES: /opt/intel/mkl/lib/ia32/libmkl_intel.a;/opt/intel/mkl/lib/ia32/libmkl_intel_thread.a;/opt/intel/mkl/lib/ia32/libmkl_core.a;/opt/intel/lib/ia32/libiomp5.a;/opt/intel/mkl/lib/ia32/libmkl_cdft_core.a
Help ? :)
TIA
/Rob
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To link with MKL static libraries on Linux it needs to use -Wl,--start-group ... -Wl,--end-group ld-options.
Please use Intel MKL Link Line Advisor
To link with MKL static libraries on Linux it needs to use -Wl,--start-group ... -Wl,--end-group ld-options.
Please use Intel MKL Link Line Advisor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem is how to specify that with CMakeLists.txt files...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or rather, which library contains symbol 'mkl_dft_commit_node_s_r2c_md_omp' ??
TIA
/Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually I solved it by enclosing my libraries using MKL, and the MKL libraries within the start-group, end-group like so:
TARGET_LINK_LIBRARIES(Application -Wl,--start-group MyLibA MyLibB ${MKL_LIBRARIES} -Wl,--end-group)
and that seems to take care of things :)
/Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that's exactly what Victor ( post #1) recommended to do and Linker Adviser recommend the similar things
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