Software Archive
Read-only legacy content
17060 Discussions

how to compile omp static? and error: x86_64-k1om-linux-ld: cannot find -liomp5

sun_l_
New Contributor I
1,153 Views

i use icc to compile and got error

part of my Makefile:

C_PLATFORM=-mmic  -openmp -pthread -static -openmp-link=static

GPP=/opt/intel/bin/icpc

when i run make, got error:

x86_64-k1om-linux-ld: cannot find -liomp5

 

then, i copy libiomp5.a to /usr/linux-k1om-4.7/x86_64-k1om-linux/lib64

then make, and got error:

x86_64-k1om-linux-ld: skipping incompatible /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/lib64/libiomp5.a when searching for -liomp5

x86_64-k1om-linux-ld: skipping incompatible /usr/linux-k1om-4.7/x86_64-k1om-linux/lib64/libiomp5.a when searching for -liomp5

x86_64-k1om-linux-ld: cannot find -liomp5

--------------------------------------------

so, how to build openmp (static)? how to fix the error above?

 

 

 

 

*******************

 

There's no support for static OpenMP link with -mmic, so you would simply remove the -openmp-link option and copy or mount mic/libiomp5.so over to the coprocessor, adding its path to LD_LIBRARY_PATH if you don't put it in with the preset library shared objects.

I don't know whether the open source OpenMP library (openmprtl.org) offers a static library build, but this would be unsupported.  The library has to be built specifically for MIC native execution;  k1om-linux-ld checks for compatibility, as you saw.

You might do better to start a separate thread with a descriptive title.

**************************

thanks to tell me that "There's no support for static OpenMP link with -mmic"

but i want to transplant this program to mic native .

so i must use -mmic

when i didn't use omp, the libs is complex, if i don't use static, there are lib dependence errors on mic.

dependence is complex, can't just put the libs on mic.

so i need to compile the program with -static and -mmic

 

https://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-4B60BCA6-1948-4EB0-A9F3-D56AA1C683F7.htm#GUID-4B60BCA6-1948-4EB0-A9F3-D56AA1C683F7

here said omp support static link, with libiomp5.a

i'm comfused...:( any help?

0 Kudos
1 Solution
Kevin_D_Intel
Employee
1,153 Views

If you have not already, you might refer to the article Building a Native Application for Intel® Xeon Phi™ Coprocessors for some details on building and running native applications on the Xeon Phi™.

You are using an older Composer XE 2013 (13.1) compiler that did not support static OpenMP usage with native (-mmic). Newer releases today do support this so if you really require -static then it is recommended (and easiest) to install the latest Composer XE 2013 SP1 (14.0 - package id l_ccompxe_2013.1.3.174). You can have the newer version installed side-by-side with your current compiler too.

You mentioned needing static due to library dependencies when building for native. If those involve the compiler run-time libs then you may not need to use -static and instead use the default linkage and then transfer the compiler RTLs to the card as discussed in the earlier cited article.

View solution in original post

0 Kudos
3 Replies
sun_l_
New Contributor I
1,153 Views
$ icc -mmic -o test test.c -openmp
$ icc -mmic -o test test.c -openmp -static
x86_64-k1om-linux-ld: cannot find -liomp5
 
 
$ echo $LD_LIBRARY_PATH
/opt/intel/impi/4.1.3.049/intel64/lib:/usr/local/netcdf-3.6.2_intel/lib:/opt/intel/composer_xe_2013.5.192/compiler/lib/intel64:/opt/intel/mic/coi/host-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2013.5.192/mpirt/lib/intel64:/opt/intel/composer_xe_2013.5.192/ipp/../compiler/lib/intel64:/opt/intel/composer_xe_2013.5.192/ipp/lib/intel64:/opt/intel/mic/coi/host-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2013.5.192/compiler/lib/intel64:/opt/intel/composer_xe_2013.5.192/mkl/lib/intel64:/opt/intel/composer_xe_2013.5.192/tbb/lib/intel64/gcc4.4
 
 

how to compile omp static TO MIC?

 
0 Kudos
Kevin_D_Intel
Employee
1,154 Views

If you have not already, you might refer to the article Building a Native Application for Intel® Xeon Phi™ Coprocessors for some details on building and running native applications on the Xeon Phi™.

You are using an older Composer XE 2013 (13.1) compiler that did not support static OpenMP usage with native (-mmic). Newer releases today do support this so if you really require -static then it is recommended (and easiest) to install the latest Composer XE 2013 SP1 (14.0 - package id l_ccompxe_2013.1.3.174). You can have the newer version installed side-by-side with your current compiler too.

You mentioned needing static due to library dependencies when building for native. If those involve the compiler run-time libs then you may not need to use -static and instead use the default linkage and then transfer the compiler RTLs to the card as discussed in the earlier cited article.

0 Kudos
Ravi_N_Intel
Employee
1,153 Views

Is the MIC_LIBRARY_PATH point to /your_compiler_install_directory/compiler/lib/mic

If this is not true then you did not source the compilervars  script to setup for using the compiler.

0 Kudos
Reply