You are here:

CHPC Compilers

CHPC actively 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.

We also may have other compilers, such as LLVM, though, we don't actively update them. If you need an update, please let us know at issues@chpc.utah.edu.

To enable each compiler, and the software stack that was built with this compiler, one needs to load the compiler module as described below. When using the compiler, you may need to modify or set flags for makefiles or other build tools (e.g. CMake) 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.8.5, that is shipped with CentOS 7 that is run on our systems. For those needing newer version, run module spider gcc to get a list of available versions. Note that different versions may have different software stack built with them. In general, we build most of the dependencies with the stock gcc 4.8.5 and provide limited stack for the higher versions based on demand.

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 a number of third party software is built with gcc 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

But to make available libraries and binaries built with gcc 4.8.5, one does need to load the (default) module:
module load gcc (or module load gcc/4.8.5)

For the newer versions, e.g. 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-AVX512,CORE-AVX2,AVX. See our Single Executable page for details. This option runs but does not generate vectorized code for the Ember and some Lonepeak nodes. As of version 18 we have seen issues with compiling more complex code with the wider encompassing -axCORE-AVX512,CORE-AVX2,AVX,SSE4.2 option which does vectorize on Ember.  Therefore our recommendation is to try to compile including the SSE4.2 option and if there are problems, remove it.

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: 3/21/18