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

rex rex@nosyntax....
Tue Jun 12 12:53:32 CDT 2007


Pearu Peterson <pearu@cens.ioc.ee> [2007-06-12 07:45]:
> 
> 
> rex wrote:
> >> I've already had to fix one problem in distutils due to Intel changing
> >> 'mkl_lapack32' in MKL8.1 to 'mkl_lapack' in MKL9.1. It appears another
> >> change is needed, perhaps in numpy/distutils/fcompiler/intel.py
> 
> The Fortran compiler version checking code (among others related codes) 
> in numpy.distutils has changed after merging David Cooke branch with
> numpy trunk. It appears that the new code is not well tested. 
 
In a post on the SciPy-users list George Nurser found the problem that I
surmised exists in numpy/distutils/fcompiler/intel.py

Following his lead, I changed all the instances of 

'version_cmd'  : ['<F77>', None] 

to 

'version_cmd'  : ['<F77>', '-V']

in numpy/distutils/fcompiler/intel.py, and rebuilt numpy. Scipy now
builds & installs w/o error:

python setup.py config --compiler=intel --fcompiler=intel build >& build_scipy-svn.log
python setup.py config --compiler=intel --fcompiler=intel install >& inst_scipy-svn.log

However, examination of the scipy build log shows that it's apparently
using gcc instead of icc (which was used in the numpy build) and since
gcc & icc are not binary compatible, this is going to cause errors,
right?

So now the question is why is scipy not recognizing the numpy setting of

cc_exe = 'icc ...'

in /usr/local/src/numpy/numpy/distutils/intelccompiler.py  ?

Numpy picks it up, but scipy apparently does not (unless I'm reading the
scipy log messages wrong, e.g., 

building 'scipy.fftpack.convolve' extension
compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC

BTW, scipy.test() mostly works, but generates a few errors. 

Thanks much for the help.

-rex




More information about the Scipy-dev mailing list