Compiler Environment – CRAY

CRAY XC40 supports three programming environment modules, namely, “PrgEnv-cray”, “PrgEnv-intel” and “PrgEnv-gnu”. The use of these modules, together with compiler wrapper scripts, means that makefiles do not need to be changed whenever there is a change in programming environment. By default, cray compilers is loaded.

  • module load cce
//to load cray compilers
  • module load intel
//to load intel compilers
  • module load gcc
//to load gnu compilers

Compiler flags to compile applications for KNL

Users can choose any compiler preferably intel.Flags for three different
environments are as follows.

  •  “-xMIC-AVX512” for Intel compilers
  •  “-hcpu=mic-knl” for Cray compilers
  •  “-march=knl” for GNU compilers

Compiler Wrapper Scripts

Code compiled on CRAY XC40 should use the compiler wrapper scripts to ensure that all the correct libraries and header files are included in both the compile and link stages. The compiler wrapper scripts are available for Fortran, C, and C++:

  • ftn — Fortran compiler
  • cc — C compiler
  • CC — C compiler

Documentation:

Cray_C_and_C-_Reference_Manual
Cray_Fortran_Reference_Manual