Skip to main content
Skip to main content

The Compilers

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

A good resource for beginners in C programming is, for example, the websitecprogramming.com.

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

 

GCC Compiler

The GCC compiler is installed in several versions. However, it is recommended to use version 9.3.0, which is installed as part of OpenHPC; from the operating system side, version 8.3.1 is also available. The former is also loaded by default asthegnu9module. Its documentation can be foundhere. Additional versions may be available and can be listed using `module avail` or `module spider gnu`.

The command to run the C compiler is`gcc`; for the C++ compiler, it is `g++`.

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

The following examples show how to load the GCC module and check the version of the C compiler:

$ 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 Compiler

Intel Parallel Studio and theIntel® oneAPI Toolkit are installed on the cluster.

Intel Parallel Studio

Intel Parallel Studio includes the Intel compiler version 19.1.3, as well as the older version 19.0.5. The installed versions can be displayed using the command `module spider intel`.

The command to invoke the compiler is`icc`for the C compiler and`icpc`for the C++ compiler. The following examples show how to load the Intel module and check the version of the Intel compiler:

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

In this example, the module was loaded without specifying the compiler version. This causes ZIMT to use the default value it has set for this module (which is marked with(D)when running `module avail`).

Intel oneAPI Toolkit

Releases 2022.2.0 and 2023.1 are installed.

$ module avail oneapi

------------------------- /cm/shared/omni/modulefiles --------------------------
   oneapi/2022.2.0    oneapi/2023.1 (L,D)

The command to invoke theicx compiler.

$ module load oneapi
$ icx --version
Intel(R) oneAPI DPC++/C++ Compiler 2023.1.0 (2023.1.0.20230320)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /cm/shared/omni/apps/oneapi/2023.1/compiler/2023.1.0/linux/bin-llvm
Configuration file: /cm/shared/omni/apps/oneapi/2023.1/compiler/2023.1.0/linux/bin-llvm/../bin/icx.cfg