Intel

Why Would You Use an Intel Compiler

The Intel compilers are produced by the manufacturer of the processors that are used in most of the clusters. These compilers provide the possibility of several advanced optimizations such as profile-guided optimization and interprocedural optimization. A second reason for chosing an Intel compiler would be that the application under consideration was developed with an Intel compiler.

Availability

All of our x86_64 Linux clusters provide Intel C, C++ and Fortran compilers.

Compatibility

The Intel compilers accept the standard ISO / ANSI languages with some extensions.

Simple Usage

One must first load an appropriate environment module. To compile a C source program named test.c into an executable program named test:

$ module load intel/19.1.1.217
$ icc -o test test.c

To compile a C source program named gravity.c into an object file to be linked later:

$ icc -c gravity.c

To combine the C object files, main.o, tensor.o, matrix.o and vector.o into an executable program called algebra:

$ icc -o algebra main.o tensor.o matrix.o vector.o

Similarly, for a C++ program:

$ icpc -o test test.cxx
$ icpc -c gravity.cxx
$ icpc -o algebra main.o tensor.o matrix.o vector.o

For a Fortran program, one might use:

$ ifort -o test test.f
$ ifort -c gravity.f
$ ifort -o algebra main.o tensor.o matrix.o vector.o

Programs written in Fortran 90 should be named ending with ".f90", rather than ".f"

Intel oneAPI

Use the commands icx, icpx and ifx for the C, C++ and Fortran compilers of the oneAPI suite:

$ module load intel/2021.1.2
$ icx --help

Parallel Codes

See these directions for parallel MPI codes.

Alternative Compilers

In addition to the Intel compilers, Research Computing provides GCC (gcc, g++, gfortran), NVIDIA HPC SDK (nvc, nvc++, nvfortran) and legacy PGI.

Debugging

The main tool used to debug Intel compiler suite programs is the GNU debugger, gdb. ARM's commercial debugger, DDT, is available on many of the clusters. Usage instructions for DDT can be found here.