Difference between revisions of "Intel Compilers and Libraries"

From UFRC
Jump to navigation Jump to search
Line 42: Line 42:
  
 
== Compiling Serial Programs ==
 
== Compiling Serial Programs ==
 +
 +
Examples for compiling serial programs:
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 77: Line 79:
 
   module load intel openmpi
 
   module load intel openmpi
  
 +
Examples for compiling MPI programs:
 +
 +
{| class="wikitable"
 +
|-
 +
! Source Langurage !! Compiler !! Command Example
 +
|-
 +
| C || mpicc || ''icc compiler_options MPI_example.c''
 +
|-
 +
| C++ || mpicxx || ''icpc compiler_options MPI_example.cxx''
 +
|-
 +
| F77 || mpif77 ||  ''ifort compiler_options MPI_example.f''
 +
|-
 +
| F90 || mpif90 || ''ifort compiler_options MPI_example.f90''
 +
|}
  
  

Revision as of 22:23, 8 November 2016

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 2016.0.109.

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 example.cxx
F77 ifort ifort compiler_options example.f
F90 ifort ifort compiler_options 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 example.c
icpc -openmp -O2 example.cpp
fort -openmp -O2 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 icc compiler_options MPI_example.c
C++ mpicxx icpc compiler_options MPI_example.cxx
F77 mpif77 ifort compiler_options MPI_example.f
F90 mpif90 ifort compiler_options MPI_example.f90