Common Linking Errors


The below mentioned are common linking errors related to Intel MKL 8.0.

Undefined References Associated with "pthread" Routines such as
__kmp_terminate_thread:

In products for Linux* and Mac OS* it is necessary to link to the pthreads library as well by using the -lpthread option. The pthread library is native to Linux* and Intel® MKL makes use of this library to support multi-threading. Depending on what functions you call, you may have to include this at the end of your link line (link order is important) regardless of whether you plan to use more than one thread.

Undefined Reference to `s_copy', `s_cat',`c_sqrt'

It is necessary to add the libg2c.a library to your link command line. In the case of Red Hat* Linux this library is located in the following directory:
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libg2c.a

The libg2c contains entry points for Fortran run-time functions. If GNU Fortran is used as the link utility all these references are resolved automatically.

Undefined Reference to: __kmpc and omp__ routines

It is necessary to link in the libguide.a library located in the default directory /opt/intel/mkl/lib/[32|64|em64t] when using threading functions.

Intel® MKL 8.0 Link Order Note: Make sure to follow this order when linking with Linux* systems. This is necessary because Linux does not support multi-pass linking:

lapack
mkl_<#> -- architecture specific library (e.g. mkl_ia32 / mkl_ipf / mkl_em64t)
libguide
libm
pthread

The Technical User Notes document contains more information on linking. It can be found in the doc directory of Intel® MKL or on the Intel® MKL website.

Undefined Reference to 'atan' when Using GNU Compiler (gcc)

To resolve the 'atan' reference in the GNU environment you need to add "-lm" to the link line after all Intel® MKL references. This is the libm library.

Unresolved external symbols when compiling and linking CBLAS and BLAS example source code included with Intel MKL: _PrintVector, GetVectorI, PrintVectorI, _PrintVectorC, _MaxValue, _GetVectorI, _GetVectorC

When compiling using the CBLAS and BLAS example source code included with Intel MKL, it is necessary to also compile and link with the common_func.c file that is supplied in the CBLAS and BLAS example files directories.

It is also advisable, when possible, to use the supplied "make" files to build the examples supplied with the Intel MKL product.

Examples source code is located in the mkl/8.0/examples directory. The Windows* default location for this is: C:\Program Files\intel\MKL\8.0\examples

 

 

Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.