Skip to content

Gaea compiler environment

Brandon Reichl edited this page Jul 24, 2020 · 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 (intel/16.0.3.210), 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
module swap intel intel/18.0.6.288
module unload netcdf
module load cray-netcdf
module load cray-hdf5
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 swap gcc gcc/7.3.0
module unload netcdf
module load cray-netcdf
module load cray-hdf5
EOFA

Then simply type

source build/gnu/env

to load up environment.

PGI compiler

The PGI compiler (pgi/16.5.0) is slow to compile but we use it because it seems more sensitive to uninitialized 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 swap pgi pgi/19.10.0
module unload netcdf
module load cray-netcdf
module load cray-hdf5
EOFA

Then type

source build/pgi/env

to load up environment.

Back to Getting Started