Wiki source code of Intel Compiler
Last modified by valad on 2024/05/23 21:57
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | Intel has rebranded its compilers and libraries and allows a free version for everyone. |
2 | |||
![]() |
2.1 | 3 | The new name is Intel oneAPI. [[url:https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html]] |
![]() |
1.1 | 4 | |
![]() |
3.1 | 5 | We have installed the Base and HPC package in the shared folder. |
![]() |
1.1 | 6 | |
7 | /home/software/intel/oneapi | ||
8 | |||
9 | You can use it by sourcing the following file: | ||
10 | |||
![]() |
4.1 | 11 | {{code language="bash"}} |
12 | source /home/software/intel/oneapi/setvars.sh | ||
13 | {{/code}} | ||
![]() |
1.1 | 14 | |
15 | 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. | ||
16 | |||
![]() |
3.1 | 17 | The latest version is **2024.0**. Older versions are kept for compatibility. Please note, that the set of compilers are different to the old pre-oneAPI compilers. In the 2024 version, the compiler 'icc' and 'ifort' have been removed. The new version are based on the open source LLVM compiler architecture. |
![]() |
1.1 | 18 | |
![]() |
2.1 | 19 | |
![]() |
1.1 | 20 | == Implicit parallelization == |
21 | |||
22 | 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: | ||
23 | |||
![]() |
4.1 | 24 | {{code language="bash"}} |
25 | export OMP_NUM_THREADS=x | ||
26 | {{/code}} | ||
![]() |
1.1 | 27 | |
![]() |
4.1 | 28 | where x is an integer and describes 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. |
![]() |
1.1 | 29 | |
30 | == Documentation == | ||
31 | |||
![]() |
3.1 | 32 | There is a lot of documentation online: [[https:~~/~~/www.intel.com/content/www/us/en/developer/tools/oneapi/documentation.html>>https://www.intel.com/content/www/us/en/developer/tools/oneapi/documentation.html]] |