You are here: Home / Systems / Mistral / Programming / Compilers and MPI

Compilers and MPI

On mistral we provide a variety of HPC compilers and MPI libraries. All of them are available via the module environment.

The current list of compilers offered on mistral comprises:

  • Intel compiler
  • GCC (GNU Compiler Collection)
  • NAG
  • and PGI (last installed version of the professional edition is 17.7, newer version will be based on the community edition if users request it)

Furthermore, several Message Passing Interface (MPI) implementations are available:

For most applications we recommend to use the Intel compiler in its latest version which fully supports the underlying CPU architecture. Regarding the MPI version to be used, we can provide full support via direct contact to the vendor:

  • IntelMPI, all versions later than 2017.1.132
  • OpenMPI starting from version 2.0.2p1 including Mellanox HPC-X toolkit
  • BullxMPI including Mellanox MXM and FCA tools was used for all benchmarks of the procurement - but is no longer supported upstream.

The compiler and an appropriate MPI library can be selected by loading the corresponding module files, for example:

# Use the "latest" versions of Intel compiler and Intel MPI
$ module load intel intelmpi

# Use a specific version of Intel compiler and OpenMPI $ module load intel/17.0.2 openmpi/2.0.2p1_hpcx-intel14
No compilers and MPIs are loaded by default. You have to use the module environment to access them. We recommend to specify the module version number explicitly otherwise the lexicographically highest version is loaded by default, which might not be latest or desired version.

The following table shows the names of the Intel compilers as well as names of IntelMPI and BullxMPI/OpenMPI compiler wrappers. The MPI compiler wrappers build up the MPI environment (i.e. set paths to MPI include files and MPI libraries) for your compilation task automatically.

LanguageIntel CompilerIntelMPI wrapperBullxMPI/OpenMPI wrapper
Fortran 90/95/2003 ifort mpiifort mpif90
Fortran 77  ifort  mpiifort  mpif77
C++ icpc mpiicpc mpic++
C icc mpiicc mpicc

The table below lists some useful compiler options that are commonly used for the Intel compiler. For further information please refer to the man pages of the compiler or the comprehensive documentation on Intel website.



 Enables the parallelizer to generate multi-threaded code based
on the OpenMP directives

-g Creates debugging information in the object files. This is necessary if you want to debug your program

-O[0-3] Sets the optimization level
-L<libary path> A path can be given in which the linker searches for libraries
-D Defines a CPP macro
-U Undefines a CPP macro
-I<include directory> Allows to add further directories to the include file search path
 -sox Stores useful information like compiler version, options used etc. in the executable
-ipo Inter-procedural optimization
-xAVX or
Indicates the processor for which code is created
-help Gives a long list of quite a big amount of options

Compilation Examples

Compile a hybrid MPI/OpenMP program using Intel Fortran compiler and OpenMPI with Mellanox HPC-X toolkit:

$ module add intel/17.0.2 openmpi/2.0.2p1_hpcx-intel14
$ mpif90 -openmp -O2 -xCORE-AVX2 -fp-model source -o mpi_omp_prog program.f90

Compile a MPI program in Fortran using Intel Fortran compiler and Intel MPI:

$ module add intel/17.0.2 intelmpi/2017.3.196
$ mpiifort -O2 -xCORE-AVX2 -fp-model source -o mpi_prog program.f90

Document Actions