- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The link line provided by MKL link line advisor(https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor) for linking static sequential libraries is:
-Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm
and -I$(MKLROOT)/include
My question is, why -lpthread library required to link a sequential library?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi San,
Thank you for the post. Right, it seem the -lpthread are not needed by sequential linkage. I will check it with internal owner and fix the problem if possible.
Thanks
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi San,
I get feedback from our team, as quite often users who use sequential linking of MKL exploit own threading in their applications. To be thread safe in that case MKL has to use TLS functionality of lpthread. Thus we require lphtread even for sequential linking. So it seems better to keep it there. and user can remove manually if it is not needed.
Best Regards,
Ying

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