Skip to content

Latest commit

 

History

History
104 lines (70 loc) · 3.07 KB

build_run.rst

File metadata and controls

104 lines (70 loc) · 3.07 KB

Building and Running MITgcm

Working on orcinus

This section describes the steps to set up and run the MITgcm code for the UBC EOAS Canyons group configurations on the orcinus.westgrid.ca HPC cluster.

When working on the Westgrid clusters the :command:`module` command must be used to load extra software components. The required modules vary from cluster to cluster. On orcinus load the python module with:

$ module load python

to make Python 2.7, the python-netCDF4 package, and Mercurial available to you.

Create a Workspace and Get the Repos

$ mkdir -p $HOME/canyons
$ cd $HOME/canyons

Use the CVS version control tool to do a checkout of the latest MITgcm source code. Use the password cvsanon when the :command:`cvs login` command prompts you for a password:

$ export CVSROOT=':pserver:cvsanon@mitgcm.org:/u/gcmpack'
$ cvs login
$ cvs co -P MITgcm

Use the Mercurial version control tool to clone the CanyonsUBC optfiles repo from Bitbucket:

$ hg clone ssh://hg@bitbucket.org/canyonsubc/optfiles

Building the Code

The MITgcm docs describe several ways of building the code. Here, we will do the build in a directory outside of the :file:`MITgcm` and :file:`optfiles` directory trees.

Note

For the purposes of developing the build instructions for orcinus the :file:`MITgcm/verification/rotating_tank/` configuration is used, but the steps below should be adaptable to your research configuration(s).

Create a configuration build directory:

$ cd $HOME/canyons
$ mkdir -p rotating_tank/build
$ cd rotating_tank/build

Build the code:

$ $HOME/canyons/MITgcm/tools/genmake2 \
    -rootdir=$HOME/canyons/MITgcm \
    -mods=$HOME/canyons/MITgcm/verification/rotating_tank/code
    -of=$HOME/canyons/optfiles/orcinus_mpi.opt \
    -mpi
$ module load intel
$ module load intel/14.0/netcdf_hdf5
$ make depend
$ make

The :command:`module load` commands bring the Intel OpenMPI Fortran compiler, and its netcdf and hdf5 libraries into your environment for the :command:`make` steps. Those modules are also required to run the code, so you need to include those :command:`module load` commands in your PBC script. However, due to some weirdness in the orcinus modules setup, they must not be loaded when you run :command:`MITgcm/tools/genmake2`. So, if you need to run :command:`genmake2` again, make sure that you first do:

$ module unload intel
$ module unload intel/14.0/netcdf_hdf5

and then re-load the modules before running :command:`make`.