Skip to content

Gaea compiler environment

Alistair Adcroft edited this page Sep 24, 2015 · 8 revisions

Setup compiler environment on Gaea

Intel compiler

Use specific versions of compilers and libraries to obtain the same model solutions that are checked in for verification. We typically store the necessary commands in a file. For example, for the intel compiler, in the "build/" directory type:

mkdir -p build/intel
cat << EOFA > build/intel/env
module unload PrgEnv-pgi
module unload PrgEnv-pathscale
module unload PrgEnv-intel
module unload PrgEnv-gnu
module unload PrgEnv-cray
module load PrgEnv-intel/4.0.46
module switch intel intel/12.0.5.220
module load netcdf/4.2.0
EOFA

This way you could simply type source build/intel/env if you wanted to load up the correct environment.

GNU compiler

The GNU compiler is more sensitive to code styles but has less useful debugging traceback. It is also the fastest to compile although the executables are often not as well optimized as other compilers. To use gnu do:

mkdir -p build/gnu
cat << EOFA > build/gnu/env
module unload PrgEnv-pgi
module unload PrgEnv-pathscale
module unload PrgEnv-intel
module unload PrgEnv-gnu
module unload PrgEnv-cray
module load PrgEnv-gnu
module load netcdf/4.2.0
EOFA

Then simply type

source build/gnu/env

to load up environment.

PGI compiler

The PGI compiler is slow to compile but we use it because it seems more sensitive to unitialized data:

mkdir -p build/pgi
cat << EOFA > build/pgi/env
module unload PrgEnv-pgi
module unload PrgEnv-pathscale
module unload PrgEnv-intel
module unload PrgEnv-gnu
module unload PrgEnv-cray
module load PrgEnv-pgi
module load netcdf/4.2.0
EOFA

Then type

source build/pgi/env

to load up environment.

Back to Getting Started