- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm compiling a source using icpc and I get this warning.
icpc: warning #10314: specifying -lm before object files may supercede the Intel(R) math library and affect performance
is it important?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ali,
This indicates that you must permit linking of the icc libraries,i think removing -lm help as the earlier diagnostic suggests.
Thank you.
--
QIAOMIN.Q
Intel Developer Support
Please participate in our redesigned community support web site:
Tools Knowledge Base: http://software.intel.com/en-us/articles/tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, so as I'm compiling a big library I have to contact the developer and ask to fix it. However not sure what message actually mean. Does it simply mean like below?
1- right now doing: icpc -lm *.o -o a.out
and should change it to?
2- icpc *.o -lm -o a.out
another issue I found during search was that it is recommended to add -limf as well to avoid some liknig errors. here
http://software.intel.com/en-us/forums/topic/298872
so the final correct command would be:
icpc *.o -lm -limf -o a.out
Am I right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icpc will cause ld to search the math libraries anyway, at the proper point in the sequence, so I think -lm is redundant. If you want to see the details, add -# to your icpc command.
In general, the message would be correct in that a library search prior to traversing your .o files would be ineffective. "linux is not windows," gnu ld doesn't act like Microsoft link.exe. If you did want to specify libimf, you would omit -lm and use -limf as you showed. icpc would still use system libraries to resolve libmath references not taken care of by libimf.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for explanations. However how should I fix this warning?

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