-
Notifications
You must be signed in to change notification settings - Fork 148
Gaea compiler environment
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 on the c1 partition, 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.
For the c3 partition, a tentative environment is:
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 unload netcdf
module load cray-netcdf
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.
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.