- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have trouble compiling the following code with the SP1 version of the Intel C++ compiler. It works with older compilers. [cpp] #include #include int main(int argc, char**argv) { #pragma offload target(mic) { } return 0; } [/cpp] icc -std=c++11 -offload-attribute-target=mic -offload-option,mic,compiler,"-z defs" main.cpp /tmp/icc1jGwdV.o: In function `std::signbit(float)': main.cpp:(.text._ZSt7signbitf[_ZSt7signbitf]+0x2): undefined reference to `__builtin_signbit' /tmp/icc1jGwdV.o: In function `std::signbit(double)': main.cpp:(.text._ZSt7signbitd[_ZSt7signbitd]+0x2): undefined reference to `__builtin_signbit' /tmp/icc1jGwdV.o: In function `std::signbit(long double)': main.cpp:(.text._ZSt7signbite[_ZSt7signbite]+0xd): undefined reference to `__builtin_signbit' /tmp/icc1jGwdV.o: In function `std::nexttoward(float, long double)': main.cpp:(.text._ZSt10nexttowardfe[_ZSt10nexttowardfe]+0xd): undefined reference to `__builtin_nexttowardf'
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You seem to have suppressed important text for your source code.
Are you sure you used icc rather than icpc, and the same version of g++, in both cases? The current icpc probably works best with g++ 4.7 or 4.8.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry for that. I wanted to include complex and cmath.
I used icc, but icpc gives the same result.
This is all running on the same machine. We use CentOS 6.4 with gcc 4.4.7 because of the Xeon Phi cards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I confirmed this problem.
I thought it might be related to g++ version, but it seems not. icpc (on host) sometimes misses support for C++11 features on account of g++ 4.4 not supporting them, but the MIC 14.0 compiler should have its own copy of headers from gcc-4.7.
Most rumors of changes for the next 14.0 update refer to performance, not failures, so it may be good to file a formal problem report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I reported this to Development and will keep this post updated as I learn more. No need for formal problem report.
(Internal tracking id: DPD200295115)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a workaround for this in the meantime?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry I missed your post earlier. Unfortunately, there is no work around at this time. I inquired w/Development regarding the status of a fix. I reiterated the impact/urgency (this has also impacted others not doing offload too) and will update once I hear more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm still experiencing issues about a "missing symbol definition of __builtin_signbit" when including <algorithm> with C++11 support and offloading to the Xeon Phi (whether actual algorithms of the include are used or not doesn't matter). I'm using the most recent version of MPSS.
The code on the host compiles and runs fine, but when the code is executed on a xeon phi it crashes (a dlopen error message).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
looking further into it, the inclusion of any one of the following three headers seems to cause trouble: algorithm, cmath and random. A minimal example to reproduce the issue (Compiler version 14.0 and MPSS 3.1.2):
#pragma offload_attribute(push, target(mic))
// Include any one of these three. No need to actually use any function.
#include <random>
#include <cmath>
#include <algorithm>
#pragma offload_attribute(pop)
int main() {
#pragma offload target(mic)
{ }
}
The code compiles and the MIC compiler just brings up a warning about the missing symbols:
*MIC* unresolved __builtin_nexttowardf
*MIC* unresolved __builtin_signbit
The application crashes when the actual offload should take place.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
the problem is fixed with Intel(R) Composer XE 2013 SP1 Update 3. Please give it a try.
Best regards,
Georg Zitzlsberger
![](/skins/images/872293744008A34B36F8ABF94A46CC66/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