Intel compilers and MPI library
Compilers are available as part of the
Intel Cluster Studio which can be enabled by loading
ics2012,
ics2013 or
ics2013sp1 modules. The different modules load different versions of Cluster Studio and
ics2013sp1 is the most recent. The Cluster Studio product includes Fortran and C/C++ compilers, an MPI library and the Math Kernel Library. If you have loaded one of the ics modules there is no need to load additional modules to enable MPI or access the MKL library.
The mpif90 command provided by Intel MPI can use different back-end compilers. The compiler for mpif90 is set using the
MPICH_F90 environment variable and is set to to
ifort unless you change it.
We are no longer receiving updates to the Intel software on Zen. The most recent versions of the compilers and MPI library can be made available by loading the
intel-final module. This provides version 15.0 of the compilers and version 5.0 of the MPI library.
Optimising
You can use compiler flags to tell the compiler how to optimise your code. For the Intel compilers the default level of optimisation is
-O2. The flags
-O3 or
-fast tell the compiler to optimise your code more aggressively and may make your executable run faster (but it's not guaranteed).
To build an executable which is specifically targeted for the CPUs on the compute nodes (Intel Xeon X5660) use the
-xSSE4.2 compiler flag, as described in
this guide. However with the -xSSE4.2 flag the executable will not run on the log in node or zen-viz.
Gnu compilers
The default version of gcc on Zen is 4.3.4 and does not include gfortran. If you want to use gfortran or a newer version of gcc then load the
gcc_local module (versions 4.4.7, 4.6.3 and 4.9.3 are available). There is also a
gcc5 module which provides gcc version 5.2.0.