- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Platform: CentOS release 6.6 (Final)
GCC: 4.9.1
Intel Parallel Studio Cluster Edition 2016
I am working on a bioinformatics application that my team and I have successfully compiled for Intel Xeon processor. Now we're trying to compile the application for MIC but we have a hard time linking it. The error that we get is the following:
x86_64-k1om-linux-ld: cannot find -lstadc++
/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: could not read symbols: File in wrong format
I have attached the makefile. Also, is there a tutorial on how to link multiple languages together for MIC because I was searching for a long time and couldn't find anything useful.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is sta++ a misspelling of std++ ? You must use -mmic consistently for both compile and link, debug or no debug. When you try to link k1om Mic objects against host libraries you will see such link errors.
- 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
Nobody has an idea how to solve this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My apologies. I should have gotten to this earlier.
Prior to using the Intel compilers, you should execute "source {installation_dir}/parallel_studio_xe_{version}/bin/psxevars.sh intel64" (or ". {installation_dir}/parallel_studio_xe_{version}/bin/psxevars.csh intel64" for csh). From your make file it looks like installation_dir is /srv/michome/gdg217/intel/. It is difficult to set the library paths yourself. From your makefile, it appears there are a number of files missing. I believe you should be able to prepend the path to those debug libraries after that but make sure you prepend the mic path to MIC_LD_LIBRARY_PATH. See if that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before I run make, I run the following commands:
source compilevars.sh intel64
source iccvars.sh intel64
source ifortvars.sh intel64
source ~/intel/parallel_studio_2016/bin/psxvars.sh intel64
export MIC_LD_LIBRARY_PATH=/home/gdg217/intel/lib/mic/
make
Result - still the same error:
/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: could not read symbols: File in wrong format
----------------
file /opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so
-> /opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right, I just realized I messed up. Of course you have sourced that file. If you hadn't, your makefile would have blown up.
Let's see if I can get it right this time.
You only need "source ~/intel/parallel_studio_2016/bin/psxvars.sh intel64". That script runs {install_dir}/compilers_and_libraries_{version}/linux/bin/compilervars.sh. The files iccvars.sh and ifortvars.sh are now aliases for compilervars.sh. Once you have run psxvars.sh, do not write over MIC_LD_LIBRARY_PATH or MIC_LIBRARY_PATH. If you have local libraries (which I don't see), you can append their location to MIC_LD_LIBRARY_PATH or MIC_LIBRARY_PATH as appropriate but don't write over them.
After that I would let the icc and ifort figure out which libraries they need based on the flags you set rather than trying to find the right ones yourself.
To use the debug libraries for tbb, add -DTBB_USE_DEBUG to your flags. You should not need to explicitly specify the names or locations of the debug libraries when MIC_LD_LIBRARY_PATH is set correctly. So I think you should comment out those lines.
I'm not sure why you are specifying /opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so and {install_dir}/advisor_xe_2016.1.0.423501/lib64/pinruntime/glibc/libc.so.6 in LIBS. They will conflict. Again, I think you should comment that out and let the compiler find the right library.
Finally, I don't think it is a good idea to specify --dynamic-linker. Let icc and ifort choose the right one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!!!
I followed your advice and changed the makefile. I tried again and I got a few pages of errors of undefined references before realizing that I had to put the library links (-ltbb) after the -o flag. I fixed that error and it worked perfectly. I attach the makefile for other people's reference.
Note: I also had to export the path to libtbb.so.2 because I didn't have root access to the machine and the installation is local
[SOLVED]

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