Wiss. Rechnen » C and C++
 

There are two different compilers for C and C++ programs on the cluster: the Gnu Compiler Collection (GCC) and the Intel Compiler.

A good starting point for beginning C developers is the tutorial series at cprogramming.com.

There are other tools available for software development that are not listed on this page. For example, Totalview can be used for parallel debugging. Various Intel tools are available for performance measurement and optimization.

GCC Compilers

The GNU compiler collection (GCC), which also contains C and C++ compilers, is installed in multiple versions. We recommend using the version 9.3.0 which is installed as part of OpenHPC, however the version 8.3.1 is also available as part of the operating system. The former is part of the gnu9 module which is loaded by default. The documentation for GNU 9.3.0 can be found here. Other versions may be available and can be displayed with module avail and module spider gnu.

The command to call the C compiler is gcc, the one for C++ is g++.

In addition to the compiler, GCC also encompasses the Gnu Debugger (gdb) which is installed in the version 8.2.12. The command for the debugger is gdb.

Here is an example of the GCC module being loaded and the C compiler version being queried:

$ module load gnu9
$ gcc --version
gcc (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Intel compilers

The software suite Intel Parallel Studio is installed on the cluster, it includes the Intel compiler version 19.1.2. Additionally, the older version 19.0.5 is installed. The intalled versions can be displayed with module spider intel.

The command for calling the compiler is icc for the C compiler and icpc for the C++ compiler. Here is an example of the Intel module being loaded and the C compiler version being queried:

$ module load intel
$ icc --version
icc (ICC) 19.1.2.254 20200623
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

In this example the module was loaded without specifying the compiler version. In that case the default setting for this module is used (it is marked with (D) when doing a module avail).

Aktualisiert um 18:12 am 8. February 2021 von Jan Steiner