- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Support Team, dear all,
I'm trying to compile and run an application for the Xeon PHI. However when I link my application with a build script it prints the following warning:
[bash]ld: warning: libirng.so, needed by /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/liboffload.so.5, not found (try using -rpath or -rpath-link)[/bash]
I still can run the program but it crashes on first offload with:
[bash]
[/bash]
To me it looks like std::sqrt is missing?
Before compiling I usually use:
[bash]source /opt/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64
source /opt/intel/vtune_amplifier_xe/amplxe-vars.sh[/bash]
My compile commands look something like this:
[bash]icpc -o foo.o -c -fmessage-length=0 -O3 -fstrict-aliasing -fargument-noalias -xHost -openmp -DSTUFF=0 -Ibuild/build_foo -Isrc src/foo.cpp[/bash]
Any help is highly appreciated!
Thank you
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It sure appears that you have completed the required steps but the compile-time warning and run-time error suggest something may still be amiss with your environment.
The missing library should be present as part of the Composer XE 2013 SP1 Update installed image under:
/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/mic/libirng.so
/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libirng.so
Double check the environment variable settings for: LD_LIBRARY_PATH, MIC_LD_LIBRARY_PATH, and MIC_LIBRARY_PATH
$ env | grep LIBRARY LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/ipp/../compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/ipp/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/tbb/lib/intel64/gcc4.4 MIC_LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/mic:/opt/intel/composer_xe_2013_sp1.2.144/mpirt/lib/mic:/opt/intel/mic/coi/device-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/mic/coi/device-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/mic:/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/mic:/opt/intel/composer_xe_2013_sp1.2.144/tbb/lib/mic LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64:/opt/intel/mic/coi/host-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2013_sp1.2.144/mpirt/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/ipp/../compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/ipp/lib/intel64:/opt/intel/mic/coi/host-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64:/opt/intel/composer_xe_2013_sp1.2.144/tbb/lib/intel64/gcc4.4 MIC_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.2.144/tbb/lib/mic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Environment variables are ok and include all you posted.
The librarys are also not missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Then it is not clear why the rpath error occurs. There must be something unique about the link.
The undefined symbol may relate to a library not being found or possibly sqrt somehow not seen as decorated with the __attribute__ (( target (mic))).
The small mock-ups that I have created won't exhibit either error. Can you share a reproducer with us?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess I should have mentioned I use OpenMP 4.0...
However I managed to reduce the problem to this:
[cpp]
#include <cmath>
#pragma omp declare target
class Foo{
public:
Foo(){}
void bar ( float one, float &two ) const {
two = std::sqrt(one);
}
};
#pragma omp end declare target
void main(){
#pragma omp target
{
Foo f;
float a, b;
f.bar(a, b);
}
}
[/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just realized the posted Code works if i put the include in declare target!
I somehow expected stuff in std:: to be treated differently on the Phi. A warning would have been nice anyway...
Is this the usual way to do this? I haven't seen this anywhere..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad to hear you resolved this. I need to check w/Developers about this. I do not see any specific exclusions for std:: in the OpenMP 4.0 spec. It appears in the definition of “mappable type” section 1.2.5, pg. 11, lines 5-21, it is required.
As for a warning, perhaps the compiler is unable to determine its use within the target region and issue something like:
test.cpp(21): error: variable "std::cout" used in "omp target" region must appear in prior "omp declare target" pragma
I will inquire w/Developers about that too.
- 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

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