- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using the offload programming model on Xeon Phi, and in the code which I want to offload to the Xeon Phi, I need to use some math functions like pow() function, however when I compile the code ,there are some errors during link stage. the error show that it seem the compiler can not find the reference of the pow function. so which path environment should set ?
Thank you!
Qiang
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you sourced the compilervars script, then the environment variables should have been properly set for you:
source /opt/intel/composerxe/bin/compilervars.sh intel64
If you did that and still had problems, perhaps you could post an example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Frances,
Thank you. I find the reason, it is because I add the "using namespace std" at the beginning of the source file . then the compiler can not find definition of std::pow() function
Qiang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry - I am still having trouble reproducing the error. Something I am doing isn't matching what you are doing. Perhaps something on the compile command? Something about the include files? Can you provide a small test case?
- 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
Now I see why I wasn't able to produce the error - I messed up and didn't include stdlib.h - but you are fine just removing the using namespace line. I'm glad you have resolved your problem.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page