[Numpy-discussion] NumPy 1.04, MKL 10.0, & Intel 10.1 icc & ifort
rex
rex at nosyntax.com
Fri Nov 9 14:16:17 EST 2007
Build was successful after a change in distutils.
Core 2 Duo, Debian Etch-32, Python 2.5, icc 10.1, ifort 10.1, & mkl
10.0. MKL & the compilers were installed to their default
locations: /opt/intel/mkl/, /opt/intel/cc/, /opt/intel/fc/
Installation will not interfere with earlier versions.
NumPy site.cfg for MKL 10.0
==========================================
[DEFAULT]
library_dirs=/opt/intel/mkl/10.0.011/lib/32
include_dirs=/opt/intel/mkl/10.0.011/include
[mkl]
libraries=mkl,guide
[lapack_info]
libraries=mkl_lapack,mkl,guide
==========================================
Changes in distutils:
=========================================================
In MKL 9.1 & 10.0, mkl_lapack32 & mkl_lapack64 no longer
exist. They were replaced by /32/mkl_lapack and
/64/mkl_lapack. As a result,
numpy-1.04/numpy/distutils/system_info.py
needs to be changed:
#lapack_libs = self.get_libs('lapack_libs',['mkl_lapack32','mkl_lapack64'])
lapack_libs = self.get_libs('lapack_libs',['mkl_lapack'])
If the above change is not made numpy builds, but without using MKL.
In numpy-1.04/numpy/distutils/ccompiler.py change:
#cc_exe = 'icc' #works, but is suboptimal
cc_exe = 'icc -msse3 -fast' #adjust to suit your cpu
=========================================================
Running the command below (all one line) from the numpy-1.04 directory
python setup.py config --compiler=intel build_clib
--compiler=intel build_ext --compiler=intel install
> inst.log
Gave this inst.log:
=====================================================
F2PY Version 2_4412
blas_opt_info:
blas_mkl_info:
FOUND:
libraries = ['mkl', 'pthread', 'mkl', 'guide']
library_dirs = ['/opt/intel/mkl/10.0.011/lib/32']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/opt/intel/mkl/10.0.011/include']
FOUND:
libraries = ['mkl', 'pthread', 'mkl', 'guide']
library_dirs = ['/opt/intel/mkl/10.0.011/lib/32']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/opt/intel/mkl/10.0.011/include']
lapack_opt_info:
lapack_mkl_info:
mkl_info:
FOUND:
libraries = ['mkl', 'pthread', 'mkl', 'guide']
library_dirs = ['/opt/intel/mkl/10.0.011/lib/32']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/opt/intel/mkl/10.0.011/include']
FOUND:
libraries = ['mkl_lapack', 'mkl', 'pthread', 'mkl', 'guide', 'mkl', 'guide']
library_dirs = ['/opt/intel/mkl/10.0.011/lib/32']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/opt/intel/mkl/10.0.011/include']
FOUND:
libraries = ['mkl_lapack', 'mkl', 'pthread', 'mkl', 'guide', 'mkl', 'guide']
library_dirs = ['/opt/intel/mkl/10.0.011/lib/32']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/opt/intel/mkl/10.0.011/include']
running config
running build_clib
running build_ext
running build_src
building py_modules sources
creating build
[...]
===========================================================
For reference, here are the respective lib/32 files for MKL 9.1
and 10.0:
c2d0:/opt/intel/mkl/9.1/lib/32# ls
libguide.a libmkl_gfortran.a libmkl_ias.so
libmkl_p3.so libmkl_p4.so libmkl_vml_def.so
libmkl_vml_p4p.so libguide.so libmkl_gfortran.so
libmkl_lapack.a libmkl_p4m.so libmkl.so
libmkl_vml_p3.so libmkl_vml_p4.so libmkl_def.so
libmkl_ia32.a libmkl_lapack.so libmkl_p4p.so
libmkl_solver.a libmkl_vml_p4m.so libvml.so
c2d0:/opt/intel/mkl/10.0.011/lib/32# ls
libguide.a libmkl_cdft_core.a libmkl_intel.a
libmkl_p4.so libmkl_vml_ia.so libguide.so
libmkl_core.a libmkl_intel.so libmkl_scalapack.a
libmkl_vml_p3.so libiomp5.a libmkl_core.so
libmkl_intel_thread.a libmkl_scalapack_core.a libmkl_vml_p4m2.so
libiomp5.so libmkl_def.so libmkl_intel_thread.so
libmkl_sequential.a libmkl_vml_p4m.s o libmkl_blacs.a
libmkl_gf.a libmkl_lapack.a libmkl_sequential.so
libmkl_vml_p4p.so libmkl_blacs_intelmpi20.a libmkl_gf.so
libmkl_lapack.so libmkl.so libmkl_vml_p4.so
libmkl_blacs_intelmpi.a libmkl_gnu_thread.a libmkl_p3.so
libmkl_solver.a libmkl_blacs_openmpi.a libmkl_gnu_thread.so
libmkl_p4m.so libmkl_solver_sequential.a libmkl_cdft.a
libmkl_ia32.a libmkl_p4p.so libmkl_vml_def.so
Thanks to all who have helped me with earlier versions.
-rex
More information about the NumPy-Discussion
mailing list