Compiling

Compilers

The following compilers are available on jaguar:

Message Passing Libraries

Upon login, the default versions of PGI and associated message passing libraries are added to each users environment through a programming environment module.

Users do not need to make any environment changes to use the default version of PGI and message passing libraries. However, if a different compiler or version is required, it is important to use the correct environment for each compiler version. To aid users in pairing the correct compiler and environment, programming environment modules are provided. The programming environment modules will load the correct pairing of compiler version, message passing libraries, and other items required to build and run. We highly recommend that the programming environment modules be used when changing compiler vendors.

The following programming environment modules are available on jaguar:

  • PrgEnv-pgi
  • PrgEnv-pathscale
  • PrgEnv-gnu

To change the default loaded PGI environment to the default Pathscale environment use:
module unload PrgEnv-pgi
module load PrgEnv-pathscale

To change the default loaded PGI environment to the Pathscale environment use:
module swap PrgEnv-pgi PrgEnv-pathscale

Note that if you want to use a specific compiler version, say PGI 7.1.5, you would first load the PGI environment and then swap the compiler versions, like:
module load PrgEnv-pgi
module swap pgi pgi/7.1.5

We also recommend not swapping any of the Cray provided modules (those with names like “xt-*” nor should moab, torque or MySQL) after loading an environment.

Compiling

Jaguar has two kinds of nodes:

  • Compute Nodes running the CNL OS
  • Service and login nodes running Linux

To build code for the compute nodes, you should use the Cray wrappers cc, CC, and ftn. The wrappers will call the appropriate compiler which will use the appropriate header files and link against the appropriate libraries. We highly recommend that the cc, CC, and ftn wrappers be used when building for the compute nodes.

To build code for the Linux service nodes, you should call the compilers directly. We strongly suggest that you don’t call the compilers directly if you are building code to run on the compute nodes.

Serial

Unless ran through aprun serial builds will run on a login or service node. For serial builds, see the individual compiler pages:

Parallel

The following wrappers should be used to build codes using MPI and OpenMP:

  • cc
  • CC
  • ftn