Intel compilers

Uit Cncz
Versie door Petervc (overleg | bijdragen) op 18 dec 2018 om 15:13 (Intel compilers)
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Ga naar: navigatie, zoeken

Intel compilers (2019 / 2014)

C&CZ heeft samen met TCM en Theoretische Chemie twee licenties voor gelijktijdig gebruik van de nieuwste versie van de Intel Parallel Studio XE voor Linux aangeschaft. Deze is geïnstalleerd in /vol/opt/intelcompilers en beschikbaar op o.a. clusternodes en loginservers. Ook de oude (2011) versie wordt verhuisd naar /vol/opt/intelcompilers. Om de omgevingsvariabelen goed te zetten, moeten SH/BASH-gebruikers vooraf uitvoeren:

source /vol/opt/intelcompilers/intel-2014/composerxe/bin/ intel64

en CSH-gebruikers:

setenv arch intel64
source /vol/opt/intelcompilers/intel-2014/composerxe/bin/compilervars.csh intel64

Daarna levert icc -V het versienummer.

Documentation for the previous version (2011)

Compiling Fortran (/opt/intel/bin/ifort)

Math Kernel Library (mkl, linking blas, lapack)

Intel Cluster Studio 2011

How to create a standalone MKL version of BLAS and LAPACK shared libraries ?

This is described in detail in Building Custom Shared Objects

  • Create a new directory (e.g. ~/lib)
 mkdir ~/lib
 cd ~/lib
  • Copy these files:
 cp /opt/intel/composerxe/mkl/tools/builder/{makefile,blas_list,lapack_list} ~/lib
  • Set the MKLROOT variable (in bash):
 export MKLROOT

In tcsh use:

 setenv MKLROOT /opt/intel/mkl
  • Make the shared libraries and
 make libintel64 export=blas_list interface=lp64  threading=parallel name=libblas_mkl
 make libintel64 export=lapack_list interface=lp64  threading=parallel name=liblapack_mkl

The options are described here

The newly created and require


to work. On the cluster nodes this file is automatically linked when required.

Using the MKL BLAS and LAPACK shared libraries (with Scilab)

This should work for any executable that uses a dynamically linked blas or lapack. We use Scilab as an example.

  • Make sure we have an executable, not just a script that calls the executable:
 file scilab-bin

The output looks something like this:

 scilab-bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15 ...
  • Determine the exact name that is used by the executable:
 ldd scilab-bin | grep blas

The output could be: => ~/sciab-5.4.1/lib/thirdparty/
  • Replace the library with a link to the MKL version
 cd ~/sciab-5.4.1/lib/thirdparty/
 ln -s ~/lib/

Also follow this procedure for lapack.

  • To use more than one thread, i.e., for parallel computation, set:

This example will use 4 cores.

  • To check the number of cores available, use:
 cat /proc/cpuinfo | grep processor | wc