[Numpy-discussion] Re: Numpy on 64 bit Xeon with ifort and mkl

Robert Kern robert.kern at gmail.com
Wed Apr 5 17:17:04 CDT 2006


Rahul Kanwar wrote:

> i successfuly compiled it without the -lmkl_em64t flag but when i import
> numpy in python it gives error that some symbol is missing. I think
> that maybe if i use ifort as the linker instead ok gcc then things
> will work out properly, but i could'nt find how to change the linker
> to ifort. Aynone there who can help me with this problem ?

It's not likely that using ifort to link will help. The problem is this bit:

> /opt/intel/mkl/8.0.2/lib/em64t/libmkl_em64t.a(def_cgemm_omp.o):
> relocation R_X86_64_PC32 against `_mkl_blas_def_cgemm_276__par_loop0'
> can not be used when making a shared object; recompile with -fPIC

You are linking against static libraries which were not compiled to be "position
independent;" that is, they can't be used in shared libraries which are what
Python extension modules are. C.f.:

http://en.wikipedia.org/wiki/Position_independent_code

Look around in /opt/intel/; they've almost certainly have provided shared
library versions of the MKL that could be used. Google gives me these, for example:

http://www.intel.com/support/performancetools/libraries/mkl/linux/sb/cs-017267.htm
http://www.intel.com/software/products/mkl/docs/mklgs_lnx.htm#Linking_Your_Application_with_Intel_MKL

-- 
Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco





More information about the Numpy-discussion mailing list