All parallel C and C++ programs should be compiled on Kraken, using the Cray wrappers cc and CC respectively. These wrappers will include and link to the correct MPI and numerical libraries respective include files and libraries. It will force the executable to be statically linked and set the correct target architecture.
The man pages of each compiler and compiler wrapper, explain in detail each compiler option and its compatibility on the Cray XT5 architecture. The following table shows some of the most common compiler options
| Compiler | Option(s) | Description |
|---|---|---|
| PGI | -fast -Mipa=fast | Standard options for speed |
| -mp | Enables OpenMP support. | |
| -Mbounds | Adds array bound checking for debugging. | |
| -Minfo | Generates an optimization report | |
| Pathscale | -Ofast | Standard option for speed |
| -OPT:fast | The previous has IPA and sometimes causes problems | |
| GNU | O2 or -O3 | Standard options for speed |
Note: Always check the compatibility of the compiler options you want to use on Cray XT systems. For example, the PGI compiler options -Mprof=mpi, -Mmpi, and -Mscalapack are not supported on the Cray XT.

