Intel v2017.01

The Intel Fortran and C/C++ 2017.1.132 compiler offers advanced optimisation, multi-threading, and processor support that includes automatic processor dispatch, vectorisation, auto-parallelisation, OpenMP, data prefetching, loop unrolling, substantial Fortran 2003 support, and an optimised math processing library.

Intel is a collection of packages commonly used to compile many applications. Such a collection is known as a toolchain. This version of Intel contains:

  • icc
  • ifort
  • Intel MKL
  • Intel MPI

We recommend using a standard toolchain (such as Intel, IOMKL or FOSS) if you plan to build any software yourself, rather than building your own versions of these packages or relying on the Operating System's version.

If you would like the equivalent of this toolchain but with OpenMPI instead of Intel MPI then use IOMKL.

Accessing the software

To load the module:

$ module load apps/intel/2017.01

The Fortran compiler is called using the command:

$ ifort

The C compiler is called using the command:

$ icc

The C++ compiler is called using the command:

$ icpc

Intel MPI

It is important to use one of these commands particularly when linking programs, as they provide the necessary libraries.  They can also simplify the use of the MPE profiling libraries, through the use of the -mpilog , -mpitrace  and -mpianim options.

Fortran

The Intel MPI Fortran77 compiler (mpif77) and Fortran90 compilers (mpif90) can be used to compile and link MPI programs written in Fortran77 or Fortran90.  They provide the options and any special libraries that are needed to compile and link MPI programs.

The MPI f77 compiler is called using the command:

$ mpif77

and the f90 compiler using the command:

$ mpif90

C/C++

The Intel MPI C compiler (mpicc) and C++ compilers (mpicxx)  can be used to compile and link MPI programs written in C or C++.  They provide the options and any special libraries that are needed to compile and link MPI programs.

Note that mpicxx cannot be used to compile C programs.  Use mpicc for C programs.

The MPI C compiler is called using the command:

$ mpicc

and the C++ compiler using the command:

$ mpicxx

Using Intel MPI can also simplify the use of the MPE profiling libraries, through the use of the -mpilog , -mpitrace  and -mpianim options.

Debugging Options

In all cases specifying the -help option to the compiler command will give a list of options and commands for more specific help, and man pages, available with the man command followed by the name of the command, for example man ifort, are available.

Fortran

To compile and run the Fortran90 program hworld.f90 to create the output file hworld and run hworld:

$ ifort hworld.f90 - o hworld
$ hworld

There are many options that can be specified to the compiler. For debugging, the most useful are:

  • -C to enable all checks on run-time conditions such as out-of-bounds array references
  • -fpe0 which specifies that floating-point invalid, divide-by-zero, and overflow exceptions are enabled. If any such exceptions occur, execution is aborted.
  • -traceback to generate extra information in the object file to allow the display of source file traceback information at run time when a severe error occurs.
  • -O0 to turn off all optimisation which allows more precise diagnosis of run-time errors.

It is important to understand that any Fortran system only defines the correct operation of a correct program; errors such as out-of-bounds array references and uninitialised variable may be treated differently by different systems. All codes should be compiled and run with these options as part of the development cycle; in particular, codes that are being moved to this system from elsewhere and show different behaviour must be checked using these options.

To compile the program myprog.f90 with all of these options use the command

$ ifort myprog.f90 -C -fpe0 -traceback -O0

C/C++

To compile and run the C program hworld.c to create the output file hworld and run hworld:

$ icc hworld.c - o hworld
$ hworld

There are many options that can be specified to the compiler. For debugging, the most useful are:

  • -C to enable all checks on run-time conditions such as out-of-bounds array references
  • -fnon-call-exceptions which specifies that floating-point invalid, divide-by-zero, and overflow exceptions are enabled. If any such exceptions occur, execution is aborted.
  • -traceback to generate extra information in the object file to allow the display of source file traceback information at run time when a severe error occurs.
  • -O0 to turn off all optimisation which allows more precise diagnosis of run-time errors.

It is important to understand that any C/C++ system only defines the correct operation of a correct program; errors such as out-of-bounds array references and uninitialised variable may be treated differently by different systems. All codes should be compiled and run with these options as part of the development cycle; in particular, codes that are being moved to this system from elsewhere and show different behaviour must be checked using these options.

To compile the program myprog.c with all of these options use the command

$ icc myprog.c -C -fnon-call-exceptions -traceback -O0

Using Optimised Numerical Routines

The Intel Maths Kernel Library (mkl) provides math processing routines to accelerate application performance and reduce development time. Intel® MKL includes highly vectorised and threaded Linear Algebra, Fast Fourier Transforms (FFT), Vector Math and Statistics functions. To link against the non-threaded part of MKL use the command-line option:

-mkl=sequential

Otherwise, use the option:

-mkl=parallel

The manual pages contain more information on how to use these (and other) options. Run the man command followed by the compiler name (icc, ifort etc.).

Accessing Previous Versions

Wherever possible, previous versions of this application will be retained for continuity, especially for research projects that require a consistent version of the software throughout the project. Such versions, however, may be unsupported by IT Services or the applications vendor, and may be withdrawn at short or no notice if they can no longer run on the cluster - for example, essential operating system upgrades may be incompatible with old versions.

The following previous versions of this software are available:

Known Problems & Limitations

  • If your code relies on redirecting a file into the standard input (stdin) of the binary using mpirun, then this will not work with Intel MPI. Try using the IOMKL toolchain instead.

Other Information

The Support Level for this software is P2.

The Intel website has more information about the Intel Compiler Suite.


Last modified: 5 October 2017