====== GCC ====== **GCC** is a software module available on **Comet**. ===== GCC overview ===== To access **GCC** on Comet, run ''module load GCC''. This will load the //default// version of **GCC**. An overview of the module information is shown below (''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$''. ---- ===== Running ===== === Versions === $ module avail GCC === Loading === $ module load GCC === Testing === $ module load GCC $ gcc -v ===== Recommendations ===== 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: **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: * https://documentation.suse.com/en-us/sbp/devel-tools/html/SBP-GCC-14/index.html 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''. ===== Requests ===== Requests for new/alternate versions of this package should be submitted via the [[https://nuservice.ncl.ac.uk|NUIT ITService]] website using the **HPC Software - Installation** category. Software requests will be collated, prioritized and submitted to our HPC support vendor. ---- [[:advanced:software_list|Back to Software List]]