[Numpy-discussion] numpy with icc

Erik Nugent erik.nugent@gmail....
Tue May 13 15:53:36 CDT 2008


I am trying to build numpy with intel icc and mkl.  I don't understand
a lot of what I am doing.  I have followed the the suggestions of what
to add/change in site.cfg intelccompiler.py and system_info.py from
several different posts or google searches.  i am not sure i have done
any of this right.  here are the contents of the files.
----------------------------------------------------------------------------------
site.cfg:

[DEFAULT]
library_dirs = /opt/intel/mkl/10.0.3.020/lib/em64t,/usr/lib64,/usr/local/lib64,/usr/local/python2.5.2-intel/lib,/usr/lib,/usr/local/lib
include_dirs = /opt/intel/mkl/10.0.3.020/include,/usr/include,/usr/local/include,/usr/local/python2.5.2-intel/include

[mkl]
include_dirs = /opt/intel/mkl/10.0.3.020/include
library_dirs = /opt/intel/mkl/10.0.3.020/lib/em64t
lapack_libs = mkl_lapack

[lapack_src]
libraries=mkl_lapack,mkl,guide

[lapack_info]
libraries=mkl_lapack,mkl,guide
-------------------------------------------------------------------------------
intelccompiler.py:

from distutils.unixccompiler import UnixCCompiler
from numpy.distutils.exec_command import find_executable

class IntelCCompiler(UnixCCompiler):

    """ A modified Intel compiler compatible with an gcc built Python.
    """

    compiler_type = 'intel'
    cc_exe = 'icc -g -O3 -w -fPIC -parallel -ipo -xT -axT'

    def __init__ (self, verbose=0, dry_run=0, force=0):
        UnixCCompiler.__init__ (self, verbose,dry_run, force)
        compiler = self.cc_exe
        self.set_executables(compiler=compiler,
                             compiler_so=compiler,
                             compiler_cxx=compiler,
                             linker_exe=compiler,
                             linker_so=compiler + ' -shared')

class IntelItaniumCCompiler(IntelCCompiler):
    compiler_type = 'intele'

    # On Itanium, the Intel Compiler used to be called ecc, let's search for
    # it (now it's also icc, so ecc is last in the search).
    for cc_exe in map(find_executable,['icc','ecc']):
        if cc_exe:
            break
----------------------------------------------------------------

system_info.py:

....
class lapack_mkl_info(mkl_info):

    def calc_info(self):
        mkl = get_info('mkl')
        if not mkl:
            return
        if sys.platform == 'win32':
            lapack_libs = self.get_libs('lapack_libs',['mkl_lapack'])
        else:
            lapack_libs = self.get_libs('lapack_libs',['mkl_lapack'])

        info = {'libraries': lapack_libs}
        dict_append(info,**mkl)
        self.set_info(**info)
...
------------------------------------------------------------------------

i then use this command to compile:

/usr/local/python2.5.2-intel/bin/python setup.py config
--compiler=intel config_fc --fcompiler=intel \
--opt='-fPIC -O3 -w -axT -xT' install > build.out


build.out has this in it:

F2PY Version 2_4422
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in /opt/intel/mkl/10.0.3.020/lib/em64t
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  NOT AVAILABLE

atlas_blas_info:
  NOT AVAILABLE

blas_info:
  NOT AVAILABLE

blas_src_info:
  NOT AVAILABLE

  NOT AVAILABLE

lapack_opt_info:
lapack_mkl_info:
mkl_info:
  libraries mkl,vml,guide not found in /opt/intel/mkl/10.0.3.020/lib/em64t
  NOT AVAILABLE

  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

lapack_info:
  NOT AVAILABLE

lapack_src_info:
  NOT AVAILABLE

  NOT AVAILABLE

running config
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands
--fcompiler options
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands
--compiler options
running build_src
building py_modules sources
creating build
creating build/src.linux-x86_64-2.5
creating build/src.linux-x86_64-2.5/numpy
creating build/src.linux-x86_64-2.5/numpy/distutils
building extension "numpy.core.multiarray" sources
creating build/src.linux-x86_64-2.5/numpy/core
Generating build/src.linux-x86_64-2.5/numpy/core/config.h
Found executable /opt/intel/cce/10.1.015/bin/icc
Could not locate executable ecc
customize IntelFCompiler
Found executable /opt/intel/fce/10.1.015/bin/ifort
C compiler: icc -g -O3 -w -fPIC -parallel -ipo -xT -axT

......

it seems to compile and install fine....  then i start python and try
to run numpy.test().  that is where i am stuck.  this is what happens:

# pwd
/usr/local/python2.5.2-intel/bin
# ./python
Python 2.5.2 (r252:60911, May 13 2008, 11:22:16)
[GCC Intel(R) C++ gcc 4.1 mode] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.test()
Numpy is installed in
/usr/local/python2.5.2-intel/lib/python2.5/site-packages/numpy
Numpy version 1.0.4
Python version 2.5.2 (r252:60911, May 13 2008, 11:22:16) [GCC Intel(R)
C++ gcc 4.1 mode]
  Found 10/10 tests for numpy.core.defmatrix
  Found 36/36 tests for numpy.core.ma
  Found 223/223 tests for numpy.core.multiarray
  Found 65/65 tests for numpy.core.numeric
  Found 31/31 tests for numpy.core.numerictypes
  Found 12/12 tests for numpy.core.records
  Found 6/6 tests for numpy.core.scalarmath
  Found 14/14 tests for numpy.core.umath
  Found 4/4 tests for numpy.ctypeslib
  Found 5/5 tests for numpy.distutils.misc_util
  Found 1/1 tests for numpy.fft.fftpack
  Found 3/3 tests for numpy.fft.helper
  Found 9/9 tests for numpy.lib.arraysetops
  Found 46/46 tests for numpy.lib.function_base
  Found 5/5 tests for numpy.lib.getlimits
  Found 4/4 tests for numpy.lib.index_tricks
  Found 3/3 tests for numpy.lib.polynomial
  Found 49/49 tests for numpy.lib.shape_base
  Found 15/15 tests for numpy.lib.twodim_base
  Found 43/43 tests for numpy.lib.type_check
  Found 1/1 tests for numpy.lib.ufunclike
  Found 40/40 tests for numpy.linalg
  Found 2/2 tests for numpy.random
  Found 0/0 tests for __main__
MKL FATAL ERROR: /opt/intel/mkl/10.0.3.020/lib/em64t/: cannot read
file data: Is a directory
#

not sure how to get past this...  although, I am sure, if numpy is not
working right then i will not be able to go on and compile scipy.....

Any help would be great....


More information about the Numpy-discussion mailing list