[Numpy-discussion] MKL libraries can't be found

Nicolas Pinto nicolas.pinto@gmail....
Sun Feb 13 03:46:44 CST 2011


Hey Jonathan,

Not sure if it will help, but here is how I got my MKL install working:

cd ~/install
virtualenv numpy_mkl
cd numpy_mkl
source bin/activate

wget http://downloads.sourceforge.net/project/numpy/NumPy/1.5.1/numpy-1.5.1.tar.gz
tar xzvf numpy-1.5.1.tar.gz
cd numpy-1.5.1

cat << EOF > site.cfg
[DEFAULT]
library_dirs = /usr/lib
include_dirs = /usr/include# numpy's configuration on resonance
[DEFAULT]
library_dirs = /usr/lib
include_dirs = /usr/include
[fftw]
libraries = fftw3
[mkl]
library_dirs = /opt/intel/Compiler/11.1/073/mkl/lib/em64t:/opt/intel/Compiler/11.1/073/lib/intel64
include_dirs = /opt/intel/Compiler/11.1/073/mkl/include:/opt/intel/Compiler/11.1/073/include
lapack_libs = mkl_lapack
mkl_libs = mkl_gf_lp64, mkl_gnu_thread, mkl_core, iomp5, guide, irc,
mkl_mc, mkl_def
EOF

wget http://projects.scipy.org/numpy/raw-attachment/ticket/993/system_info.patch
patch numpy/distutils/system_info.py < system_info.patch

cat > intelccompiler.patch << EOF
--- numpy/distutils/intelccompiler.py   2010-11-08 17:58:24.000000000 -0600
+++ numpy/distutils/intelccompiler.py.patched   2011-02-13
02:09:24.247386568 -0600
@@ -8,7 +8,7 @@
     """

     compiler_type = 'intel'
-    cc_exe = 'icc'
+    cc_exe = 'icc -fPIC -O3 -mmse4 -fast'

     def __init__ (self, verbose=0, dry_run=0, force=0):
         UnixCCompiler.__init__ (self, verbose,dry_run, force)
EOF

patch -p0 < intelccompiler.patch

python setup.py config
python setup.py build_ext --compiler=intel --fcompiler=intel install
--prefix=~/local

HTH

Best,

N


On Wed, Jan 19, 2011 at 5:24 PM, Jonathan Tu <jhtu@princeton.edu> wrote:
> Hi,
>
> I am trying to install numpy with the MKL libraries available on my cluster.  Most of the libraries are available in one directory, but the iomp5 library is in another.
>
> /opt/intel/Compiler/11.1/072/mkl/lib/em64t ---> mkl_intel_lp64, mkl_intel_thread, mkl_core, mkl_def, mkl_mc
> /opt/intel/Compiler/11.1/072/lib/intel64 ---> iomp5
>
> Using an older MKL library that was available, I found that when all libraries are in one directory, the install went through fine.  But in this case it says the libraries cannot be found, even if I list both under the library_dirs in site.cfg
>
> [mkl]
> library_dirs = /opt/intel/Compiler/11.1/072/mkl/lib/em64t:/opt/intel/Compiler/11.1/072/lib/intel64
> include_dirs = /opt/intel/Compiler/11.1/072/mkl/include
> lapack_libs = mkl_lapack
> mkl_libs = mkl_intel_lp64, mkl_intel_thread, mkl_core, mkl_def, mkl_mc, iomp5
>
> If I try to install without iomp5, then when I import numpy I get the following error
>
> /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_thread.so: undefined symbol: omp_in_parallel
>
> Any ideas?  I tried to put symbolic links to both library directories in one place, but that didn't work either.  I'm trying to avoid creating a directory of symbolic links to every necessary library.
>
>
>
>
> Jonathan Tu
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
Nicolas Pinto
http://web.mit.edu/pinto


More information about the NumPy-Discussion mailing list