Cray Compiler

Programming Environment

The Cray compilers are loaded by default when you login to Blue Waters; simply use the wrappers for compiling C (cc), C++ (CC), and Fortran (ftn) code.  If you have been working with a different compiler, you can switch back to using the Cray compiler using the module command, e.g.:

 module swap PrgEnv-gnu PrgEnv-cray

To see all available compiler versions, use the command:

module avail cray

To switch to a different version of the compiler, use the command:

module swap cray cray/<version>

The Cray compiler provides support for the latest AMD Interlagos (Bulldozer) instructions such as Advanced Vector Instructions (AVX), Fused multiply-add (FMA), and XOP (a revision of SSE5), as well as the latest industrial standards including MPI, OpenMP v3.0 and v4.x, and OpenACC v2.0 (all enabled by default). However, the Cray compilers are not typically installed on hardware from other vendors; this may or may not impact portability of application source code.



There are numerous compile-time flags that can be used.  For complete listings, see the man pages:

man crayftn

man craycc

man crayCC

man crayc++



The Cray compiler recognizes and interprets OpenMP directives by default; this behavior can be disabled using one of the following compiler flags:

 -h noomp




Fortran file naming

Fortran file naming conventions (can override with flags)
             suffix               Format, Processing
             .f                   Fixed-format source, compile
             .F                   Fixed-format source, preprocess, compile
             .f90, .f95, .f03,    Free-format source, compile
             .f08, .ftn
             .F90, .F95, .F03,    Free-format source, preprocess, compile
             .F08, .FTN
             .o                   object file, link
             .a                   assembler source, assemble

Debugging options

Use the following flag to specify how verbose the Cray compiler is when displaying error and warning messages:

 -h msglevel_n