GCC is a software module available on Comet.
To access GCC on Comet, run module load GCC. This will load the default version of GCC.
module load GCC
An overview of the module information is shown below (module -r spider ^GCC$):
module -r spider ^GCC$
GCC: Versions: GCC/10.3.0 GCC/11.2.0 GCC/11.3.0 GCC/12.2.0 GCC/12.3.0 GCC/13.2.0 GCC/13.3.0 GCC/14.2.0 GCC/14.3.0 Other possible modules matches: GCCcore To find other possible module matches execute: $ module -r spider '.*GCC.*' For detailed information about a specific "GCC" package (including how to load the modules) use the module's full name. Note that names that have a trailing (E) are extensions provided by other modules. For example: $ module spider GCC/14.3.0
If there are multiple versions of GCC listed, then you can load a specific version as follows:
$ module load GCC/version_string
You can find the most up to date information whilst logged on to Comet by running module -r spider ^GCC$.
$ module avail GCC
$ module load GCC
$ module load GCC $ gcc -v
For the AMD Epyc processors which make up Comet, use the -march=znver5 compiler flag for GCC to enable detection and optimisation for the AMD Zen5 architecture of the compute node processors. As all nodes of Comet share the same Zen5 architecture, any binaries produced with these flags will run optimally across all node types:
-march=znver5
Light optimisation
# Note - this is the minimum optimisation we would recommend for production code gcc -march=znver5 -O -pipe
Normal optimisation
# Note - this is the recommended optimisation level gcc -march=znver5 -O2 -pipe
Full optimisation
gcc -march=znver5 -O3 -pipe
Additional options are discussed in this article from SUSE:
The znver5 architecture target is only available in GCC 14 and higher. If you must use an earlier version of GCC, then use the -march=native flag, for example: CFLAGS=-O3 -march=native -pipe.
znver5
-march=native
CFLAGS=-O3 -march=native -pipe
Requests for new/alternate versions of this package should be submitted via the NUIT ITService website using the HPC Software - Installation category.
Software requests will be collated, prioritized and submitted to our HPC support vendor.
Back to Software List
Table of Contents
HPC Service
Main Content Sections
Documentation Tools