You are here

Compilers - C, C++ and Fortran

Table of Contents


On this page we discuss the availability of several different compilers for the widely used languages, C, C++ and Fortran.  (Other programming languages are handled on separate pages.) The compilers are often installed as part of a suite so it is often possible to give a single version number for all three languages at once.  The GNU Compiler Collection (GCC) and Intel compiler suite are available at all the main WestGrid computational sites.  Portland Group (PGI) compilers are only available on some of the WestGrid systems.


The GCC compilers are free, but, for the Intel and PGI compilers, WestGrid has purchased licenses.  The licenses are managed separately at each site.  On occasion one may encounter an error message indicating that a license is not available. This is usually due to a system problem, but, on rare occasions may be due to too many instances of the compiler being used simultaneously.  If a problem with obtaining a license persists for more than a few minutes, please report the problem to WestGrid support.

Compiler availability

In this section we summarize the default compilers available on various WestGrid systems. There are often other versions installed, including some newer than the default, which are selected by using an appropriate module command.  If a system shows no default then that compiler is not on the default command PATH, but, is available by loading a module.


System Default GCC version Default Intel version


4.4.7 12.0.4


4.8.0 13.1.3


4.4.7 14.0.2


4.1.2 11.1


4.3.4 12.1.5


4.4.7 No default


4.4.7 12.1.4


4.4.7 No default


4.4.7 12.1.4




Using the compilers

The table below shows the names of the compilers to use on the command line when compiling your code.

  C C++ Fortran

Generic names

Compilers with these generic names are on the default command PATH on some WestGrid systems.  These generic compilers are usually a version of the corresponding compiler from the GNU Compiler Collection, with the exception of Bugaboo, which changes the meaning of these names depending on what environment modules have been loaded.  If the generic names are not available, use one of the specific names (or the corresponding MPI wrapper, if appropriate) given below.

cc c++ f77, f90, f95

Open MPI wrappers

To compile programs that use the parallel processing through the Message Passing Interface (MPI), a wrapper script is usually used, as it automatically provides the arguments needed to link the code against the appropriate libraries.  The names of the wrapper scripts appropriate for use with Open MPI (the MPI implementation that is used for most parallel programs on WestGrid) are shown here. On some WestGrid systems, these wrappers are not on the default command PATH, but, are made available by loading an appropriate environment module.  The compiler run by the wrapper often depends on what environment modules have been loaded previously. Call the wrapper with a -show argument to learn which compiler is actually used. 

mpicc mpiCC, mpicxx, mpic++ mpif77, mpif90

GNU Compiler Collection (GCC)

gcc g++ gfortran

Intel compilers

icc icpc ifort

Portland Group compilers

pgcc pgCC, pgcpp pgf77, pgf95, pgfortran


See the Programming page for examples of using the compilers.

For More Information

2015-12-10 - Page created
2016-01-07 - Added compiler names table.
2016-12-12 - Clarified generic name section.