GCC
GNU Compiler Collection (GCC) is one of the most popular compilers for compiling C, C++ and Fortran programs.
In Triton we have various GCC versions installed, but only some of them are actively supported.
Basic usage
Hello world in C
Let’s consider the following Hello world-program
(hello.c)
written in C.
#include <stdio.h>
int main()
{
printf("Hello world.\n");
return 0;
}
After downloading it to a folder, we can compile it with GCC.
First, let’s load up a GCC module:
module load triton/2024.1-gcc gcc/12.3.0
Secondly, let’s compile the code:
gcc -o hello hello.c
Now we can run the program:
./hello
This outputs the expected Hello world-string.
Available installations
System compiler is installed only on the login node. Other versions of GCC are installed as modules and are all part of one of our software stacks. To make them available, you need to first load the appropriate software stack module. Versions labeled “default” are the ones that have been used to build the rest of that software stack.
GCC version |
Module name |
Software stack |
|---|---|---|
11.5.0 |
none (on login node only) |
none (available by default) |
6.5.0 |
gcc/6.5.0 |
triton/2024.1-gcc |
10.5.0 |
gcc/10.5.0 |
triton/2024.1-gcc |
11.4.0 |
gcc/11.4.0 |
triton/2024.1-gcc |
12.3.0 (default) |
gcc/12.3.0 |
triton/2024.1-gcc |
13.2.0 |
gcc/13.2.0 |
triton/2024.1-gcc |
13.3.0 (default) |
gcc/13.3.0 |
triton/2025.1-gcc |
If you need a different version of GCC, please send a request through the issue tracker.