GNU Compilers

Fortran, C and C++ compilers produced by the GNU Project. 

Availability and Restrictions

Versions

The GNU Compiler Collection (GCC) are available on all our clusters. These are the versions currently available:

Version Pitzer Ascend Cardinal Notes
11.4.1 X# X# X#  
12.3.0 X X X*  
13.2.0 X X X  
* Current Default Version
# System version
** There is always some version of the GNU compilers in the environment. If you want a specific version you should load the appropriate module. If you don't have a module loaded you will get either the system version or some other version, depending on what modules you do have loaded.

Modules

You can use module spider gcc to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.

To find out what version of gcc you are using, type gcc --version.

Access

The GNU compilers are available to all OSC users. If you have any questions, please contact OSC Help.

Publisher/Vendor/Repository and License Type

https://www.gnu.org/software/gcc/, Open source

Usage

Usage on Pitzer

Set-up

To configure your environment for use of the GNU compilers, run the following command (you may have to unload your selected compiler - if an error message appears, it will provide instructions): module load gcc/version.  For example, use module load gnu/8.1.0 to load GNU 8.1.0.

How to Compile

Once the module is loaded, follow the guides below for compile commands:

LANGUAGE NON-MPI MPI
Fortran 90 or 95 gfortran mpif90
Fortran 77 gfortran mpif77
c gcc mpicc
c++ g++ mpicxx

Building Options

The GNU compilers recognize the following command line options :

COMPILER OPTION PURPOSE
-fopenmp Enables compiler recognition of OpenMP directives (except mpif77)
-o FILENAME

Specifies the name of the object file

-O0 or no -O  option Disable optimization
-O1 or -O Ligh optimization
-O2 Heavy optimization
-O3 Most expensive optimization (Recommended)

 

 

 

 

 

 

There are numerous flags that can be used. For more information run man <compiler binary name>.

Known Issues

Further Reading

See Also

Supercomputer: 
Service: 
Technologies: 
Fields of Science: 

Known Issues for GNU Compilers