Pages

Wednesday, May 7, 2014

Building Numpy and Scipy with icc, ifort and Intel MKL

My rig .
OS : Ubuntu 12.04 64 bit
Numpy : 1.8.1
Scipy: 0.14
gcc: 4.6.3
icc/ifort: 14.0.2
Intel MKL: 11.1 update 2

Modified from https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl to get passed all test in Numpy and Scipy, using https://github.com/scipy/scipy/issues/1205

Edit intel.py from numpy/distutils/fcompiler/ to change optimization to O1
Compile and install Numpy using gcc:
python setup.py config build_clib build_ext -lstdc++ install

Compile and install Scipy using icc and ifort:
python setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem -lstdc++ install