Difference between revisions of "Intel Compiler"

From IT Service Wiki
Jump to: navigation, search
(.bashrc)
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This page describes, how to setup your environment for using our temporary Intel Compiler Installation. The instruction are for '''bash''' shell user. If you use a different shell, you know what you are doing and you will be able to translate the configuration.  
+
Intel has rebranded its compilers and libraries and allows a free version for everyone.
  
We provide the recent version 11 of the Intel compiler suite for Fortran, C/C++ and the full set performance libraries like  MKL, TBB, Cluster_OMP.
+
The new name is Intel oneAPI. [https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html]
  
== .bashrc ==
+
We have installed the Base and HPC package in the shared folder
  
In order to use the installation you have to modify your '''.bashrc'''. Open the file with you favorite editor and append the following lines.
+
/home/software/intel/oneapi
  
 +
You can use it by sourcing the following file:
  
<pre>
+
. /home/software/intel/oneapi/setvars.sh
#Intel Compiler Setup
 
export LM_LICENSE_FILE="16287@th.physik.uni-frankfurt.de"
 
  
intel_arch="intel64"
+
Unfortunately this script take some seconds to complete, it is not recommended to include it into the bashrc. We will look for a faster solution for the use in the bashrc.
if [[ `uname -m` == "i686" ]]; then
 
  intel_arch="ia32"
 
fi
 
  
iccvars=/opt/intel/Compiler/11.0/069/bin/iccvars.sh
 
if [ -f $iccvars ]; then
 
    . $iccvars $intel_arch
 
fi
 
ifortvars=/opt/intel/Compiler/11.0/069/bin/iccvars.sh
 
if [ -f $ifortvars ]; then
 
    . $ifortvars $intel_arch
 
fi
 
  
</pre>
+
== Implicit parallelization ==
  
There are similar files with .csh extension for C-Shell users.
+
This version of MKL has internal parallel code (based on openMP) which uses all CPUs in the system. This is fine on the desktop as it will speed up your caluclation. But on the compute nodes this will conflict with other jobs running on the same machine. Therefore you have to restrict the number CPUs used to the number of allocated slots in SGE. Your can do this by defining the following environment variable:
  
After sourcing your .bashrc or opening an new shell you can validate your setup with 'which ifort'. This should point to somewhere in /opt.
+
  export OMP_NUM_THREADS=x
  
== 32/64 bit Issues ==
+
where x is the number of allocated slots. Using 1 means traditional serial processing. You should benchmark your program how many parallel threads will give a reasonable performance per CPU value.
 
 
If you only work on 64 bit machines you can skip this section. But if you are working on 32 bit machine think can get more complicates. If you exclusively work on a 32 bit and you don't want the run your programs on the our HPC nodes you can also skip this. 32 bit machines are mainly the white FSC boxes and less important the pool. Running "uname -m" in a shell will tell you your architecture: i686 for 32 or x86_64 for 64 bit. The setup above will choose the appropriate environment.
 
 
 
If you are using a 32bit machine and want use the HPC nodes, it is recommended that you login to our login server th.physik.uni-frankfurt.de an compile your code there. 32 bit programs will run on 64 bit but have some limitations. A small performance impact and limited address space (4 GB) with much less usable ram.
 
  
 
== Documentation ==
 
== Documentation ==
  
The comprehensive set of Intel documentation will be found under '''/opt/intel/Compiler/11.0/069/Documentation/'''.
+
The comprehensive set of Intel documentation will be found under '''/home/software/intel/documentation_2018/en'''.

Latest revision as of 15:16, 6 January 2022

Intel has rebranded its compilers and libraries and allows a free version for everyone.

The new name is Intel oneAPI. [1]

We have installed the Base and HPC package in the shared folder

/home/software/intel/oneapi

You can use it by sourcing the following file:

. /home/software/intel/oneapi/setvars.sh

Unfortunately this script take some seconds to complete, it is not recommended to include it into the bashrc. We will look for a faster solution for the use in the bashrc.


Implicit parallelization

This version of MKL has internal parallel code (based on openMP) which uses all CPUs in the system. This is fine on the desktop as it will speed up your caluclation. But on the compute nodes this will conflict with other jobs running on the same machine. Therefore you have to restrict the number CPUs used to the number of allocated slots in SGE. Your can do this by defining the following environment variable:

 export OMP_NUM_THREADS=x

where x is the number of allocated slots. Using 1 means traditional serial processing. You should benchmark your program how many parallel threads will give a reasonable performance per CPU value.

Documentation

The comprehensive set of Intel documentation will be found under /home/software/intel/documentation_2018/en.