For some reasons I have to link explicitly the pthread libraries during the compilation (make). This is ok when I produced the CPU version. I'm trying to do the same thing with -mmic to enable the Intel Xeon Phi Coprocessor. However, I've got the following errors:
x86_64-k1om-linux-ld: skipping incompatible /lib64/libpthread.so.0 when searching for /lib64/libpthread.so.0
x86_64-k1om-linux-ld: cannot find /lib64/libpthread.so.0
x86_64-k1om-linux-ld: skipping incompatible /usr/lib64/libpthread_nonshared.a when searching for /usr/lib64/libpthread_nonshared.a
x86_64-k1om-linux-ld: cannot find /usr/lib64/libpthread_nonshared.a
I tried to find some MIC-specific pthread libraries in /opt/intel without having any good results.
Anyone any idea about which one of pthread library used by MIC?
Thanks a lot for the comments.
If you source the environment script, e.g. source /opt/intel/composer_xe_2013/bin/compilervars.sh intel64, then compile with
icc -mmic -lpthread pthread.c
It should work fine. I can't reproduce any problem. What does your compile line look like?
If it's easier for you to link directly to the pthread library for Intel Xeon Phi coprocessors (versus using just -lpthread), depending on your MPSS version (in this case 2.1.6720-13), you will find the pthread library here: /usr/linux-k1om-4.7/linux-k1om/lib64