Difference between revisions of "Intel Compilers and Libraries"

From UFRC
Jump to navigation Jump to search
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Software]][[Category:Compilers]][[Category:Programming]][[Category:C++]]
+
[[Category:Software]][[Category:Programming]][[Category:Language]][[Category:Library]][[Category:Math]][[Category:Compiler]]
 
{|<!--CONFIGURATION: REQUIRED-->
 
{|<!--CONFIGURATION: REQUIRED-->
 
|{{#vardefine:app|intel}}
 
|{{#vardefine:app|intel}}
Line 5: Line 5:
 
<!--CONFIGURATION: OPTIONAL (|1}} means it's ON)-->
 
<!--CONFIGURATION: OPTIONAL (|1}} means it's ON)-->
 
|{{#vardefine:conf|}}          <!--CONFIGURATION-->
 
|{{#vardefine:conf|}}          <!--CONFIGURATION-->
|{{#vardefine:exe|}}            <!--ADDITIONAL INFO-->
+
|{{#vardefine:exe|1}}            <!--ADDITIONAL INFO-->
 
|{{#vardefine:pbs|}}            <!--PBS SCRIPTS-->
 
|{{#vardefine:pbs|}}            <!--PBS SCRIPTS-->
 
|{{#vardefine:policy|}}        <!--POLICY-->
 
|{{#vardefine:policy|}}        <!--POLICY-->
Line 21: Line 21:
  
 
;Note:
 
;Note:
:The default intel version is 2016.0.109.  
+
:The default intel version is <code>intel/2020.0.166</code>.  
  
 
<!--Modules-->
 
<!--Modules-->
Line 94: Line 94:
 
|}
 
|}
  
 +
Please refer to the compiler man pages or use "''-help''" command option, for example
 +
 +
mpicc -help
 +
man mpicc
 +
 +
Please see [[Sample_SLURM_Scripts]] for example job scripts to run MPI and hybrid MPI/Threaded jobs.
  
 
<!--Configuration-->
 
<!--Configuration-->
Line 101: Line 107:
 
<!--Run-->
 
<!--Run-->
 
{{#if: {{#var: exe}}|==Additional Information==
 
{{#if: {{#var: exe}}|==Additional Information==
 +
==Compiling for the right hardware==
 +
To take the advantages of the Advanced Vector Extensions (AVX) please use the following compiler option for better performance when AVX is available:
 +
-msse3 -axcore-avx2,core-avx-i
  
WRITE_ADDITIONAL_INSTRUCTIONS_ON_RUNNING_THE_SOFTWARE_IF_NECESSARY
+
Note that HPG2 and HPG3 CPUs do not support anything above AVX2.
 
 
 
|}}
 
|}}
 
<!--PBS scripts-->
 
<!--PBS scripts-->

Latest revision as of 18:04, 27 September 2023

Description

intel website  

Intel® Parallel Studio XE is a software development suite that helps boost application performance by taking advantage of the ever-increasing processor core count and vector register width available in Intel® Xeon® processors, Intel® Xeon Phi™ processors and coprocessors, and other compatible processors.

Note
The default intel version is intel/2020.0.166.

Required Modules

Serial

  • intel

System Variables

  • HPC_MKL_DIR - Intel MKL library installation directory
  • HPC_MKL_LIB - Intel MKL library file directory
  • HPC_MKL_INC - Intel MKL library include file directory

Compiling Serial Programs

Examples for compiling serial programs:

Source Langurage Compiler Command Example
C icc icc compiler_options example.c
C++ icpc icpc compiler_options -o example.exe example.cxx
F77 ifort ifort compiler_options -o example.exe example.f
F90 ifort ifort compiler_options -o example.exe example.f90

For detailed information on compiler options, please refer to the compiler man pages or use "-help" command option, for example

icc -help
man icc

Compiling OpenMP Programs

For multi-threaded shared memory parallel applications using OpenMP threading paradigm, add "-openmp" to the compiler options. For example:

icc -openmp -O2 -o example.exe example.c
icpc -openmp -O2 -o example.exe example.cpp
fort -openmp -O2 -o example.exe example.f90

Please see Sample_SLURM_Scripts for example job scripts to run threaded or multi-processor jobs.

Compiling MPI Programs

For distributed parallel MPI programs, the MPI library supported on hipergator is OpenMPI. To use Intel compiler with OpenMPI, please load the modules:

 module load intel openmpi

Examples for compiling MPI programs:

Source Langurage Compiler Command Example
C mpicc epic -O2 -o MPI_example.exe MPI_example.c
C++ mpicxx mpicxx -O2 -o MPI_example.exe MPI_example.cxx
F77 mpif77 mpif77 -O2 -o MPI_example.exe MPI_example.f
F90 mpif90 mpif90 -O2 -o MPI_example.exe MPI_example.f90

Please refer to the compiler man pages or use "-help" command option, for example

mpicc -help
man mpicc

Please see Sample_SLURM_Scripts for example job scripts to run MPI and hybrid MPI/Threaded jobs.


Additional Information

Compiling for the right hardware

To take the advantages of the Advanced Vector Extensions (AVX) please use the following compiler option for better performance when AVX is available:

-msse3 -axcore-avx2,core-avx-i

Note that HPG2 and HPG3 CPUs do not support anything above AVX2.