[SciPy-dev] Compiling scipy with Intel ifort & MKL

rex rex@nosyntax....
Tue Jun 12 17:41:48 CDT 2007


rex <rex@nosyntax.com> [2007-06-12 13:59]:
> Still, I'd like to use icc in both numpy and scipy -- mixing them just
> doesn't seem like a good idea, and gcc will be slower, especially in the
> Core 2 Duo system I'm building on.
> 
> Looking at the scipy build log, it appears that the problem may be in distutils/unixccompiler.py
> 
> From my limited (and quite possibly wrong) understanding it appears that
> unixccompiler.py/ccompiler.py is not finding icc & mkl. None of the
> strings in ccompiler.py for intel match what icc -V returns:
> 
> Intel(R) C Compiler for applications running on IA-32, Version 10.0    Build 20070426 Package ID: l_cc_p_10.0.023

Continuing the quest, I changed ccompiler.py from:

compiler_class['intel'] = ('intelccompiler','IntelCCompiler',
                            "Intel C Compiler for 32-bit applications")

to

compiler_class['intel'] = ('intelccompiler','IntelCCompiler',
                            "Intel(R) C Compiler for applications running on IA-32")

and rebuilt numpy and then tried to build scipy. This time it found icc
all the way though, but it lost the ifort it found earlier in the same
build. :(

icc -g -fomit-frame-pointer -xT -fast -shared build/temp.linux-i686-2.5/build/src.linux-i686-2.5/Lib/integrate/vodemodule.o
+build/temp.linux-i686-2.5/build/src.linux-i686-2.5/fortranobject.o -L/opt/intel/mkl/9.1/lib/32 -L/usr/lib/python2.5/config
+-Lbuild/temp.linux-i686-2.5 -lodepack -llinpack_lite -lmach -lmkl -lvml -lguide -lpthread -lpython2.5 -o
+build/lib.linux-i686-2.5/scipy/integrate/vode.so
ipo: remark #11000: performing multi-file optimizations
ipo: remark #11005: generating object file /tmp/ipo_icc23RIxK.o
build/src.linux-i686-2.5/fortranobject.c(534): (col. 9) remark: LOOP WAS VECTORIZED.
build/src.linux-i686-2.5/fortranobject.c(751): (col. 5) remark: LOOP WAS VECTORIZED.
build/src.linux-i686-2.5/fortranobject.c(782): (col. 5) remark: LOOP WAS VECTORIZED.
building 'scipy.interpolate._fitpack' extension
warning: build_ext: extension 'scipy.interpolate._fitpack' has Fortran libraries but no Fortran linker found, using default linker
compiling C sources
C compiler: icc -g -fomit-frame-pointer -xT -fast

compile options: '-I/usr/local/lib/python2.5/site-packages/numpy/core/include -I/usr/include/python2.5 -c'
icc: Lib/interpolate/_fitpackmodule.c
icc -g -fomit-frame-pointer -xT -fast -shared build/temp.linux-i686-2.5/Lib/interpolate/_fitpackmodule.o -L/usr/lib/python2.5/config
+-Lbuild/temp.linux-i686-2.5 -lfitpack -lpython2.5 -o build/lib.linux-i686-2.5/scipy/interpolate/_fitpack.so
ipo: remark #11001: performing single-file optimizations
ipo: remark #11005: generating object file /tmp/ipo_iccNl0Bbp.o
Lib/interpolate/__fitpack.h(1053): (col. 13) remark: LOOP WAS VECTORIZED.
building 'scipy.interpolate.dfitpack' extension
error: extension 'scipy.interpolate.dfitpack' has Fortran sources but no Fortran compiler found

It found the fortran compiler earlier in the same build:

building 'statlib' library
compiling Fortran sources
Fortran f77 compiler: /opt/intel/fc/10.0.023/bin/ifort -72 -w90 -w95 -KPIC -cm -O3 -unroll -arch SSE2
Fortran f90 compiler: /opt/intel/fc/10.0.023/bin/ifort -FR -KPIC -cm -O3 -unroll -arch SSE2
Fortran fix compiler: /opt/intel/fc/10.0.023/bin/ifort -FI -KPIC -cm -O3 -unroll -arch SSE2

The first sign of a problem was later when this appeared:

building 'scipy.fftpack._fftpack' extension
warning: build_ext: extension 'scipy.fftpack._fftpack' has Fortran libraries but no Fortran linker found, using default linker

Why did fixing the failure of ccompiler.py to find icc break finding the
fortran complier late (after ~5000 lines) in the scipy build? 

-rex





More information about the Scipy-dev mailing list