You are here:

CHPC Compilers

CHPC supports several different compilers. The GNU Compiler Suite includes ANSI C, C++ and Fortran 77 compilers. In addition to GNU compilers, we offer two commercial compiler suites. The Intel compilers generally provide superior performance on the Intel CPUs. They include C, C++ and Fortran 77/90/95. We also have a license for the PGI compilers. The Portland Group Compiler Suite performs the best on AMD CPUs. They should also interoperate with GNU, though we have seen problems with execution of some Fortran codes that were linking g77 compiled libraries.

Each compiler suite is enabled by default in the .tcshrc or .bashrc for the arches and peaks clusters, so please make sure you have the current versions of each. You may need to modify or set flags for makefiles provided by third party developers.

For help with compiler issues, please contact the CHPC help desk at issues@chpc.utah.edu.


GNU compilers

The current version is 4.4.7, that is shipped with CentOS 6 that is run on our systems. For those needing newer version, we also provide version 4.9.2 which environment needs to be set up prior to use.

CentOS 7 ships with version 4.8.5, however, some advanced compiler features, such as C++11 standard, are supported only from 4.9 series, therefore we also provide version 4.9.2 on CentOS 7.

The system GNU distribution is located in the default areas: /usr/bin, /usr/lib or /usr/lib64 for libraries, /usr/include for headers, etc. The user should not need to do anything else than to invoke the compiler by its name, e.g.:

gcc source.c -o executable
gfortran source.f -o executable

For the newer version 4.9.2, load the following module, or put to your .custom.sh shell init file:
module load gcc/4.9.2

Documentation on the GNU compilers can be found at the GCC site.


Intel compilers

Multiple versions of the Intel C and Fortran compiler suite are located at /uufs/chpc.utah.edu/sys/installdir/intel. To find the default compiler version, use the -v flag (ie, icc -v, ifort -v, or icpc -v). Older version can be obtained by loading the particular module, run module spider intel to find what versions are available.

In order to use the compiler, users have to load the module that defines paths and some other environment variables.

module load intel

The compilers are invoked as icc, icpc and ifort for C, C++ and F90, respectively. For list of available flags, use the man pages (e.g. man icc).

We generally recommend flag -fast for superior performance, however, some of the optimizations using this flag may lose precision for floating-point divides. Also note that one can build optimized executable that runs multiple CPU architectures, for CHPC clusters use  -axCORE-AVX2,AVX,SSE4.2. See our Single Executable page for details.

For more information on the compilers,visit the Intel compiler site.

Documentation including user's guide, language reference, etc. can be found in the Intel Software Documentation Library.


PGI compilers

The latest version of Portland Group compilers are located at: /uufs/chpc.utah.edu/sys/installdir/pgi.

To find the compiler version, use flag -V, i.e. pgcc -V.

In order to use the compiler, users have to load the module that defines paths and some other environment variables. The default usually points to the latest version.

module load pgi

The compilers are invoked as pgcc, pgCC, pgf77 and pgf90 for C, C++, F77 and F90, respectively. For list of available flags, use the man pages (e.g. man pgcc).

We generally recommend flag -fastsse for good performance.

For more information on the compiler, visit Portland Group website.

Documentation including user's guide, language reference, etc. can be found here.


PathScale compilers

PathScale is no longer being updated by the CHPC, due to changes in PathScale ownership over the years. The old versions are maintained on the cluster for legacy purposes.

The current available version of the PathScale compilers (V3.2) is located at /uufs/chpc.utah.edu/sys/pkg/pscale/std.

In order to use the compiler, users have to source shell script that defines paths and some other environment variables.

source /uufs/chpc.utah.edu/sys/pkg/pscale/std/etc/pscale.csh
source /uufs/chpc.utah.edu/sys/pkg/pscale/std/etc/pscale.sh

The compilers are invoked as pathcc, pathCC and pathf90 for C, C++ and F90, respectively. For list of available flags, use the man pages (e.g. man pathf90).

Aggressive optimization is achieved with -O3 -OPT:Ofast. Further performance gain can be achieved with using interprocedural analysis, invoked with -ipa flag, however, there are some limitations with the usage. Contact CHPC staff if you run into problems.

For more information on the compiler visit the PathScale EKOPath site.

Documentation is located here: PathScale Documentation.

Last Updated: 5/16/17