This is an archival dump of old wiki content --- see scipy.org for current material

Installing Intel Compilers and MKL (INCOMPLETE)

The Intel compilers and the MKL are free for non-commercial use. You may download them from Intel http://www.intel.com/ (Search for non-commerical in the search box at the top of the page http://www.intel.com:80/cd/software/products/asmo-na/eng/download/download/219771.htm.)

Download and unpack the C++ compiler, Fortran compiler and Math Kernel Library. Installation instructions can be found in the directories and consist of running the install.sh script in each directory and answering a bunch of questions (including providing the license number you recieved before downloading).

The only problem I had was installing the MKL: it did not seem to calculate the correct disk space and refused to install in my specified location. A workaround was to make the directory first: upon subsequently trying to install, the installation program became so worried about overwriting stuff in the now pre-existing directory that it forgot to miscalculate the disk space...

After the instalation was complete, everything was installed in ${BASE}/apps/intel/cc/9.1.047, ${BASE}/apps/intel/fc/9.1.043, and ${BASE}/apps/intel/mkl/9.0. I manually added some symlinks ${BASE}/apps/intel/cc/current -> ${BASE}/apps/intel/cc/9.1.047 etc. Note that I have had problems with some programs still trying to use cc even though I have set CC=icc. To deal with this I also symlinked icc -> cc.

cd /<home>/apps/intel/cc/
ln -s 9.1.047 current
cd current/bin
ln -s icc cc
cd /<home>/apps/intel/fc/
ln -s 9.1.043 current
cd /<home>/apps/intel/mkl/
ln -s 9.0 current

I added the directories ${BASE}/apps/intel/cc/current/bin etc. to my path environmental variable using the following script (which I run whenever I want to use the Intel compilers.)

# Setup path and environment for using intel compilers.
export PATH=\
${BASE}/apps/intel/cc/current/bin/:\
${BASE}/apps/intel/fc/current/bin/:\
${BASE}/apps/intel/idb/current/bin/:\
${BASE}/usr/local/bin/:\
${PATH}

export CC=icc

export LD_LIBRARY_PATH=\
${BASE}/apps/intel/cc/current/lib/:\
${BASE}/apps/intel/fc/current/lib/:\
${BASE}/apps/intel/idb/current/lib/:\
${BASE}/usr/local/bin/

Compiling and Installing Python 2.5

Using Intel Compiler (Fails...)

I have tried compiling python with the Intel compiler but run into a problem. Here is how I proceeded...

  1. First download the desired version of the python source from http://www.python.org/download/ (I am using 2.5 here).

  2. Unpack this to ${BASE}/src. I renamed the directory ${BASE}/src/Python-2.5_intel because I have a gcc build as well.

  3. Now configure python for compilations. Note that to use the Intel compilers, you must specify some command-line options here:
    • cd ${BASE}/src/Python-2.5_intel
      ./configure --with-gcc=icc\
                  --with-cxx-main=icc\
                  --prefix=${BASE}/apps/Python-2.5_intel/\
                  OPT="-O3 -g -w1"
      • This works fine.
    1. Run make. This fails with optimizations. The compilation proceeds and completes (though with several warnings and many remarks) and a python executable is formed, but then during the python portion of the make, I get the following errors and warning:
      make
      ...
      icc -c -fno-strict-aliasing -O3 -g -w1  -I. -I./Include   -DPy_BUILD_CORE -o Objects/abstract.o Objects/abstract.c
      Objects/abstract.c(1678): warning #279: controlling expression is constant
                                      assert(!"unknown operation");
                                      ^
      ...
      icc -c -fno-strict-aliasing -O3 -g -w1  -I. -I./Include   -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
      Objects/obmalloc.c(413): warning #170: pointer points outside of underlying object
              PT(0), PT(1), PT(2), PT(3), PT(4), PT(5), PT(6), PT(7)
              ^
      
      Objects/obmalloc.c(413): warning #170: pointer points outside of underlying object
              PT(0), PT(1), PT(2), PT(3), PT(4), PT(5), PT(6), PT(7)
              ^
      ...
      icc -c -fno-strict-aliasing -O3 -g -w1  -I. -I./Include   -DPy_BUILD_CORE -o Objects/stringobject.o Objects/stringobject.c
      Objects/stringobject.c(4223): warning #279: controlling expression is constant
                      assert(!"'type' not in [duoxX]");
                      ^
      ...
      icc -c -fno-strict-aliasing -O3 -g -w1  -I. -I./Include   -DPy_BUILD_CORE -o Python/Python-ast.o Python/Python-ast.c
      Python/Python-ast.c(2276): warning #188: enumerated type mixed with another type
                        value = ast2obj_int(o->v.ImportFrom.level);
                                            ^
      
      Python/Python-ast.c(2332): warning #188: enumerated type mixed with another type
                value = ast2obj_int(o->lineno);
                                    ^
      
      Python/Python-ast.c(2337): warning #188: enumerated type mixed with another type
                value = ast2obj_int(o->col_offset);
                                    ^
      
      Python/Python-ast.c(2655): warning #188: enumerated type mixed with another type
                value = ast2obj_int(o->lineno);
                                    ^
      
      Python/Python-ast.c(2660): warning #188: enumerated type mixed with another type
                value = ast2obj_int(o->col_offset);
                                    ^
      
      Python/Python-ast.c(2925): warning #188: enumerated type mixed with another type
                value = ast2obj_int(o->lineno);
                                    ^
      
      Python/Python-ast.c(2930): warning #188: enumerated type mixed with another type
                value = ast2obj_int(o->col_offset);
                                    ^
      ...
      icc  -Xlinker -export-dynamic -o python \
                      Modules/python.o \
                      libpython2.5.a -ldl  -lutil   -lm
      libpython2.5.a(posixmodule.o)(.text+0x3596): In function `posix_tmpnam':
      ./Modules/posixmodule.c:6720: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
      libpython2.5.a(posixmodule.o)(.text+0x351e): In function `posix_tempnam':
      ./Modules/posixmodule.c:6673: warning: the use of `tempnam' is dangerous, better use `mkstemp'
      case $MAKEFLAGS in \
      *-s*)  CC='icc' LDSHARED='icc -shared' OPT='-O3 -g -w1' ./python -E ./setup.py -q build;; \
      *)  CC='icc' LDSHARED='icc -shared' OPT='-O3 -g -w1' ./python -E ./setup.py build;; \
      esac
      'import site' failed; use -v for traceback
      Traceback (most recent call last):
        File "./setup.py", line 6, in <module>
          import sys, os, imp, re, optparse
        File "${BASE}/src/Python-2.5_intel/Lib/optparse.py", line 71, in <module>
          import textwrap
        File "${BASE}/src/Python-2.5_intel/Lib/textwrap.py", line 10, in <module>
          import string, re
        File "${BASE}/src/Python-2.5_intel/Lib/string.py", line 26, in <module>
          letters = lowercase + uppercase
      SystemError: error return without exception set

SciPy: Installing_SciPy/Linux/BuildingFromSource/Intel_1 (last edited 2015-10-24 17:48:23 by anonymous)