[Numpy-discussion] compiling and linking MKL with numpy/scipy

Olivier Delalleau shish@keba...
Wed Nov 23 09:26:12 CST 2011


I attached a site.cfg file for numpy 1.3 compiled with MKL on some Linux 64
bit architecture, in case it might help.
I always had trouble getting programs (other than numpy though) to link and
execute properly with MKL.
You might also try to play with LD_PRELOAD.
Good luck,

-=- Olivier

2011/11/23 Xavier Barthelemy <xabart@gmail.com>

> Dear everyone
>
> I have been a bit better
>
> patching the files I finally get something
>
> in .basrc
>
> source /opt/intel/composer_xe_2011_sp1.7.256/bin/compilervars.sh intel64
> source /opt/intel/composer_xe_2011_sp1.7.256/mkl/bin/mklvars.sh intel64
> lp64
> export OMP_NUM_THREADS=4
> export KMP_AFFINITY=verbose,compact
>
> env variables:
> export
> LD_LIBRARY_PATH=/opt/intel/composer_xe_2011_sp1.7.256/mkl/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/:/opt/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/intel64/lp64:/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/:$LD_LIBRARY_PATH
>
> site.cfg
>
> [mkl]
> library_dirs =
> /opt/intel/composer_xe_2011_sp1.7.256/mkl/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/:/opt/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/intel64/lp64/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/
> include_dirs =
> /opt/intel/composer_xe_2011_sp1.7.256/mkl/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/:/opt/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/intel64/lp64/:/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/
> lapack_libs =
> mkl_libs = mkl_def, mkl_intel_lp64, mkl_core , mkl_intel_thread, mkl_mc
>
> distutils/intelcompiler.py
>
> cc_exe = 'icc -m64 -O2 -fomit-frame-pointer -openmp -lpthread -fPIC -xHost
> -fp-model strict -L/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64
> -I/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/intel64/lp64 -lm'
> ccxx_exe = 'icpc -m64 -O2 -fomit-frame-pointer -openmp -lpthread -fPIC
> -xHost -fp-model strict
> -L/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64
> -I/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/intel64/lp64 -lm'
>
>
> distutils/fcompiler/intel.py
>
> return ['-O3 -openmp -fpe0
> -L/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64 -lpthread -xHost
> -I/opt/intel/composer_xe_2011_sp1.7.256/mkl/include/intel64/lp64
> -I/opt/intel/composer_xe_2011_sp1.7.256/mkl/include -lm']
>
> in numpy.test("full")
>
> i get test_double (test_linalg.TestCond2) ... python: symbol lookup error:
> /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_sequential.so:
> undefined symbol: mkl_serv_lock
>
>
>
> I am trying to look for mkl_serv_lock, but impossible to find.
>
> some ideas, someone?
>
> Xavier
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111123/91f1dd55/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: site.cfg
Type: application/octet-stream
Size: 5961 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111123/91f1dd55/attachment.obj 


More information about the NumPy-Discussion mailing list