[Numpy-discussion] Linking against MKL but still slow?

Christoph Dann ch.ro.dann at googlemail.com
Mon Mar 26 05:06:56 EDT 2012


Dear list,

so far I used Enthoughts Python Distribution which contains a compiled 
version of numpy linked against MKL. Now, I want to implement my own 
extensions to numpy, so I need my build numpy on my own. So, I installed 
Intel Parallel studio including MKL and the C / Fortran compilers.

I linked against the same libraries as Enthought:

In [2]: np.show_config()
lapack_opt_info:
    libraries = ['mkl_lapack95_lp64', 'iomp5', 'mkl_def', 'mkl_intel_lp64', 
'mkl_intel_thread', 'mkl_core', 'pthread']
    library_dirs = ['/opt/intel/lib/intel64', '/opt/intel/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/include/']
blas_opt_info:
    libraries = ['iomp5', 'mkl_def', 'mkl_intel_lp64', 'mkl_intel_thread', 
'mkl_core', 'pthread']
    library_dirs = ['/opt/intel/lib/intel64', '/opt/intel/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/include/']
lapack_mkl_info:
    libraries = ['mkl_lapack95_lp64', 'iomp5', 'mkl_def', 'mkl_intel_lp64', 
'mkl_intel_thread', 'mkl_core', 'pthread']
    library_dirs = ['/opt/intel/lib/intel64', '/opt/intel/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/include/']
blas_mkl_info:
    libraries = ['iomp5', 'mkl_def', 'mkl_intel_lp64', 'mkl_intel_thread', 
'mkl_core', 'pthread']
    library_dirs = ['/opt/intel/lib/intel64', '/opt/intel/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/include/']
mkl_info:
    libraries = ['iomp5', 'mkl_def', 'mkl_intel_lp64', 'mkl_intel_thread', 
'mkl_core', 'pthread']
    library_dirs = ['/opt/intel/lib/intel64', '/opt/intel/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/include/']


and used the intel compilers to build numpy. Since I have an i7 processor I 
compiled including AVX instructions. Yet, EPD is double as fast as my own 
build executing the simple benchmark from: 
http://dpinte.wordpress.com/2010/01/15/numpy-performance-improvement-with-the-mkl/
I expected at least comparable performance. How is such a decrease 
possible? Did I miss a significant part to make numpy really fast?

Thanks
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120326/2b74deb7/attachment.html>


More information about the NumPy-Discussion mailing list