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

rex rex@nosyntax....
Sun Jun 10 19:24:32 CDT 2007


rex <rex@nosyntax.com> [2007-06-10 16:12]:
> rex <rex@nosyntax.com> [2007-06-10 13:37]:
> > Using recent svn SciPy:
> > 
> > /usr/local/src/scipy # python setup.py config --compiler=intel --fcompiler=intel build_clib --compiler=intel --fcompiler=intel build_ext --compiler=intel --fcompiler=intel install
> 
> I get the same errors when using the gcc compiler, which is a strong
> hint that blas and lapack need to be installed. Duh! Doing that now...

It still fails with:
error: file 'dfftpack/*.f' does not exist
Details are below.

This is with SUSE 10.2 Intel MKL9.1, & Intel FORTRAN 10

I followed Steve Baum's instructions at:

http://pong.tamu.edu/tiki/tiki-view_blog_post.php?blogId=6&postId=97

cd scipy       #recent svn
mkdir -p blas
cd blas
wget http://www.netlib.org/blas/blas.tgz
tar xzf blas.tgz
#this results in a blas/BLAS/*.f directory structure. I moved all files
#up into the blas directory and eliminated the BLAS subdirectory.

Instead of:
#g77 -fno-second-underscore -O2 -c *.f

ifort -fno-second-underscore -c -xT -fast *.f
ifort: command line warning #10006: ignoring unknown option '-fno-second-underscore'
#this ignored option may need to be fixed, but I think not.
ar r libfblas.a *.o
ranlib libfblas.a
rm -rf *.o
cp libfblas.a /usr/local/lib
export BLAS=/usr/local/lib/libfblas.a
cd ..
wget http://www.netlib.org/lapack/lapack.tgz
tar xzf lapack.tgz
cd LAPACK
cp INSTALL/make.inc.LINUX make.inc

Now you must edit make.inc and change (if necessary) the following values:

#FORTRAN  = g77
FORTRAN  = ifort
#OPTS     = -funroll-all-loops -O3
OPTS     = -xT -funroll-all-loops -fast
DRVOPTS  = $(OPTS)
NOOPT    =
#LOADER   = g77
LOADER  = ifort

Now to finish the compilation:

make lapacklib >& make.log 
make clean
cp lapack_LINUX.a libflapack.a
cp libflapack.a /usr/local/lib
export LAPACK=/usr/local/lib/libflapack.a
cd ..

python setup.py config --compiler=intel --fcompiler=intel build_clib --compiler=intel --fcompiler=intel build_ext --compiler=intel --fcompiler=intel install >& inst.log

non-existing path in 'scipy/cluster': 'tests'
non-existing path in 'scipy/cluster': 'src/vq_wrap.cpp'
mkl_info:
  FOUND:
    libraries = ['mkl', 'vml', 'guide', 'pthread']
    library_dirs = ['/opt/intel/mkl/9.1/lib/32']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/mkl/9.1/include']

non-existing path in 'scipy/fftpack': 'tests'
could not resolve pattern in 'scipy/fftpack': 'dfftpack/*.f'
non-existing path in 'scipy/fftpack': 'fftpack.pyf'
non-existing path in 'scipy/fftpack': 'src/zfft.c'
non-existing path in 'scipy/fftpack': 'src/drfft.c'
non-existing path in 'scipy/fftpack': 'src/zrfft.c'
non-existing path in 'scipy/fftpack': 'src/zfftnd.c'
non-existing path in 'scipy/fftpack': 'src/zfft_djbfft.c'
non-existing path in 'scipy/fftpack': 'src/zfft_fftpack.c'
non-existing path in 'scipy/fftpack': 'src/zfft_fftw.c'
non-existing path in 'scipy/fftpack': 'src/zfft_fftw3.c'
non-existing path in 'scipy/fftpack': 'src/zfft_mkl.c'
non-existing path in 'scipy/fftpack': 'convolve.pyf'
non-existing path in 'scipy/fftpack': 'src/convolve.c'
blas_opt_info:
blas_mkl_info:
  FOUND:
    libraries = ['mkl', 'vml', 'guide', 'pthread']
    library_dirs = ['/opt/intel/mkl/9.1/lib/32']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/mkl/9.1/include']

  FOUND:
    libraries = ['mkl', 'vml', 'guide', 'pthread']
    library_dirs = ['/opt/intel/mkl/9.1/lib/32']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/mkl/9.1/include']

...

customize IntelFCompiler
Couldn't match compiler version for 'Intel(R) Fortran Compiler for applications running on IA-32, Version 10.0    Build 20070426 Package ID:
+l_fc_p_10.0.023\nCopyright (C) 1985-2007 Intel Corporation.  All rights reserved.\nFOR NON-COMMERCIAL USE ONLY\n\n Intel Fortran 10.0-1023'
customize IntelFCompiler using build_clib
building 'dfftpack' library
compiling Fortran sources
Fortran f77 compiler: /opt/intel/fc/10.0.023/bin/ifort -72 -w90 -w95 -KPIC -cm -O3 -unroll -xM -arch SSE2
Fortran f90 compiler: /opt/intel/fc/10.0.023/bin/ifort -FR -KPIC -cm -O3 -unroll -xM -arch SSE2
Fortran fix compiler: /opt/intel/fc/10.0.023/bin/ifort -FI -KPIC -cm -O3 -unroll -xM -arch SSE2
error: file 'dfftpack/*.f' does not exist

It does exist as you can see:

/usr/local/src/scipy/Lib/fftpack/dfftpack # ls
dcosqb.f  dcost.f   dfftb.f   dffti1.f  doc.double  dsinqi.f  dsinti.f  zfftb.f   zffti1.f
dcosqf.f  dcosti.f  dfftf1.f  dffti.f   dsinqb.f    dsint1.f  .svn      zfftf1.f  zffti.f
dcosqi.f  dfftb1.f  dfftf.f   doc       dsinqf.f    dsint.f   zfftb1.f  zfftf.f

Again, any hints appreciated.

-rex





More information about the Scipy-dev mailing list