HPC2N - Support - Compiling: Usage

Compiler usage

 

[PathScale Compilers | Intel Compilers | Portland Group (PGI) Compilers | Gnu Compiler Collection (GCC) Compilers ]

The examples below will load the default versions. To see all the versions available, type the command

module avail <module name>

where module name is the compiler name (psc, intel-compiler, pgi, gcc).

OpenMP: Intel, PathScale, and PGI has this included, so it is enough to load the module for these and then add the appropriate flag (see Flags).

PathScale compilers

To be able to use the PathScale compilers, load the module

module load psc

Go here for further information about loading the compilers and other versions of the compilers.

Compiling (remember to load the right module first!)

Language Compiler name MPI
Fortran77 pathf90 mpif77
Fortran90 pathf90 mpif90
Fortran95 pathf95 N/A
C pathcc mpicc
C++ pathCC mpiCC

There are more information to find on the man pages which can be found by typing 

man <compiler name>

Here is a link to a place with more information:

Intel Compilers

The Intel compilers are only installed on akka and we only have a limited number of licences. Because of this, you may sometimes experince that there is none available. Wait for a little while and try again. 

To use the Intel compilers, load the module

(only C/C++ compilers)

module load intel-c

(only Fortan compilers)

module load intel-fortran

(both C/C++ and Fortran compilers)

module load intel-compiler

Go here for further information about loading the compilers and other versions of the compilers.

Compiling (remember to load the right module first!)

Language Compiler name MPI
Fortran77 ifort mpif77
Fortran90 ifort mpif90
Fortran95 ifort N/A
C icc  mpicc
C++ icp mpiCC

There are more information to find on the man pages which can be found by typing 

man <compiler name>

Here are some links to places with more information:

Portland group (PGI) compilers

To be able to use the PGI compilers, load the module

module load pgi

Go here for further information about loading the compilers and other versions of the compilers.

Compiling (remember to load the right module first!)

Language Compiler name MPI
Fortran77 pgf77 mpif77
Fortran90 pgf90 mpif90
Fortran95 pgf95 N/A
C pgcc  mpicc
C++ pgCC mpiCC

There is also a High Performance Fortran compiler: pghpf.

There are more information to find on the man pages which can be found by typing 

man <compiler name>

Here is a link to a place with more information:

GNU Compiler Collection (GCC)

You do not need to load anything to use the serial and OpenMP compilers for the GCC compilers, as they are already in your path. You do, however, need to load the MPI library module for them in order to be able to compile your MPI programs. To do that, do:

module load openmpi/gcc

or (only for Akka)

module load mvapich/gcc

Go here for further information about loading the compilers and other versions of the compilers.

Compiling (remember to load the right module first, if using MPI!)

Language Compiler name MPI
Fortran77 gfortran mpif77
Fortran90 gfortran mpif90
Fortran95 gfortran N/A
C gcc  mpicc
C++ g++ mpiCC

There are more information to find on the man pages which can be found by typing 

man <compiler name>

Here is a link to a place with more information: