[SciPy-user] Numpy on 64 bit Xeon with ifort and mkl

Rahul Kanwar rahul.kanwar at gmail.com
Wed Apr 5 17:33:40 CDT 2006


Hello,

   I am trying to compile Numpy on 64 bit Xeon with ifort and mkl
libraries running Suse 10.0 linux. I had set the MKLROOT variable to
the mkl library root but it could'nt find the 64 bit library. After a
little bit of snooping I found the following in
numpy/distutils/cpuinfo.py

------------------------------
    def _is_XEON(self):
        return re.match(r'.*?XEON\b',
                        self.info[0]['model name']) is not None

    _is_Xeon = _is_XEON
------------------------------
  I changed XEON to Xeon and it worked and was able to indentify the
em64t libraries. But it again got stuck with the following message. I
used the following command to build Numpy
 python setup.py config_fc --fcompiler=intel install

------------------------------
building 'numpy.core._dotblas' extension
compiling C sources
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -O2
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC'
compile options: '-Inumpy/core/blasdot -I/opt/intel/mkl/8.0.2/include
-Inumpy/core/include -Ibuild/src/numpy/core -Inumpy/core/src
-Inumpy/core/include -I/usr/include/python2.4 -c'
gcc -pthread -shared
build/temp.linux-x86_64-2.4/numpy/core/blasdot/_dotblas.o
-L/opt/intel/mkl/8.0.2/lib/em64t -lmkl_em64t -lmkl -lvml -lguide
-lpthread -o build/lib.linux-x86_64-2.4/numpy/core/_dotblas.so
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
/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
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
/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
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
error: Command "gcc -pthread -shared
build/temp.linux-x86_64-2.4/numpy/core/blasdot/_dotblas.o
-L/opt/intel/mkl/8.0.2/lib/em64t -lmkl_em64t -lmkl -lvml -lguide
-lpthread -o build/lib.linux-x86_64-2.4/numpy/core/_dotblas.so" failed
with exit status 1
----------------------------------------------
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 ?

regards,
Rahul



More information about the SciPy-user mailing list