[SciPy-user] Building Python, Numpy and Scipy with Intel compilers and MKL

Matthieu Brucher matthieu.brucher@gmail....
Tue Apr 28 13:58:42 CDT 2009


I'm still surprised you had so many troubles. I compile Python with
several extensions without having to specify the C compiler.

Matthieu

2009/4/28 Craig Finch <oanjao@yahoo.com>:
>
> I figured it out--I am now able to build Python, Numpy, and Scipy with the Intel C, C++, and Fortran compilers.  Here is the command line that I used:
>
> /home/me/Python_Test/bin/python setup.py config --compiler=intel --fcompiler=intelem config_fc --fcompiler=intelem install --home=/home/me/Python_Test > scipy_build_log.txt
>
> What I did differently to make it work: pass the --fcompiler=intelem option to the config_fc module. The option "--fcompiler=intel" did not work for me (perhaps because I am compiling on a 64-bit machine?)  Unfortunately, Numpy distutils are not well documented, so I had to read the source to figure this out.
>
> Thanks to those who offered advice.  Now that I have two separate installs, one built with GCC and one with Intel, I will try to run some benchmarks to compare the two.
>
>   Craig
>
>
>
> ----- Original Message ----
> From: Craig Finch <oanjao@yahoo.com>
> To: scipy-user@scipy.org
> Sent: Wednesday, April 22, 2009 6:31:08 PM
> Subject: Building Python, Numpy and Scipy with Intel compilers and MKL
>
> I'm trying to build Python, Numpy, and SciPy on a Red Hat system using the Intel Fortran, C, and C++ compilers, along with the Intel Math Kernel Library.  This is proving to be difficult--I've tried everything I could find on the web, and it's still not working (everything works fine if I use GCC).  I would really appreciate any suggestions.
>
> I can get Python and Numpy working correctly after compiling with Intel compilers, but I can't import anything from SciPy without getting an "undefined symbol" error.  According to what I've read, this can happen when gfortran is used to compile some library (such as BLAS) while Intel fortran is used to compile SciPy.  I don't think this is my problem, because I'm only using the Intel Math Kernel Libraries.  Is this correct?
>
> Here's my latest attempt at installation:
> Python install:
> CC='icc'
> CXX='icc' LDFLAGS='-L/opt/intel/cce/10.1.008/lib' CFLAGS='-I/opt/intel/cce/10.1.008/include' CXXFLAGS='-I/opt/intel/cce/10.1.008/include' ./configure -prefix=/home/me
>
> Numpy install:
> python setup.py config --compiler=intel --fcompiler=intel install --home=/home/me
>
> Scipy install:
> python
> setup.py config --compiler=intel --fcompiler=intel build_ext
> --fcompiler=intel -L/opt/intel/cce/10.1.008/lib  install --home=/home/me
>
> Here's something that bothers me: when I start my Python interpreter which was compiled with icc, this is what I see:
> Python 2.5.4 (r254:67916, Apr 22 2009, 15:52:10)
> [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>>
>
> Why
> does the interpreter think it's built with GCC?  Can that be causing
> problems with SciPy?  How can I ensure that only Intel libraries are
> used?
>
>    Craig
>
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



-- 
Information System Engineer, Ph.D.
Website: http://matthieu-brucher.developpez.com/
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn: http://www.linkedin.com/in/matthieubrucher


More information about the SciPy-user mailing list