Programming languages on the Cray XT4


To switch to another compiler you must use modules.

Compiling an application for use on the compute node should be done by the following wrappers. Running the command "module list" will give you one entry like "PrgEnv-###", where ### is either pgi, pathscale, gnu or intel. When running the wrappers below, the compiler ### will be used. If you want to switch from pgi to gnu, run:

module swap PrgEnv-pgi PrgEnv-gnu

Compute node compilers (wrappers):

Fortran 90/95 programs   ftn
Fortran 77 programs      f77
C programs               cc
C++ programs             CC

These wrappers also handles MPI and openMP, so you should not compile with mpicc, mpif90 or similar.

Usefull optimization flags for quadcore

When using PGI the "-tp barcelona-64" flag will improve the performance of your code. For Pathscale the flag for optimizing for quadcore is "-march=barcelona"

The following languages are supported.

PGI Compiler

By default the pgi compiler is already loaded at login. A "module list" shows if it is loaded. For compiling your program for the compute node the module "PrgEnv-pgi" should be loaded. When the correct programming environment is selected the program can be compiled by using the appropriate wrapper (given above), which depends on the language of your program. Compiling pgi for use on the login node:

Pgi fortran 77 compiler     pgf77
Pgi fortran 90 compiler     pgf90
Pgi fortran 95 compiler     pgf95
Pgi C compiler              pgcc
Pgi C++ compiler            pfCC
PathScale Compiler

For compiling programs for the login node with pathscale the following are available:

PathScale fortran 90 compiler     pathf90
PathScale fortran 95 compiler     pathf95
PathScale C compiler              pathcc
PathScale C++ compiler            pathCC
For compiling programs for the compute nodes you should first make sure that the correct module is loaded, that is PrgEnv-pathscale must be loaded. If it isn't run: "module swap PrgEnv-### PrgEnv-pathscale" (where ### is the preloaded module. Either gnu or pgi). Then compile your program with the compilers listed on the top; cc, CC, pgf90, etc.

GNU Compiler

For compiling programs for the login node with the GNU compiler, use the following compilers:

GNU fortran 77 compiler    g77
GNU C compiler             gcc
GNU C++ compiler           g++

And with module gcc/4.2.1 loaded:
GNU fortran 90 compiler    gfortran

Using the GNU compilere when compiling for compute nodes the module PrgEnv-gnu has to be loaded. Then compile using the wrappers given at the top of this page.
Intel Compiler

For compiling programs for the login node with the Intel compiler, use the following compilers:

Intel fortran 77 compiler    ifort
Intel C compiler             icc
Intel C++ compiler           icc
Intel fortran 90 compiler    ifort

Using the Intel compilere when compiling for compute nodes the module PrgEnv-intel has to be loaded. Then compile using the wrappers given at the top of this page.