GEOS-5 Checkout and Build Instructions: Difference between revisions

Line 37: Line 37:
=== Setup your environment to build the code ===
=== Setup your environment to build the code ===
Now you've checked out the code.  Your should have a directory called GEOSagcm in front of you.  You're almost ready to build the code at this point.
Now you've checked out the code.  Your should have a directory called GEOSagcm in front of you.  You're almost ready to build the code at this point.
The first thing to do is to make sure you have a compiler and the necessary libraries available.  I'll assume you're on '''discover'''.  In this case, you want to load some ''modules''.  Modules define versions of compilers and libraries (like MPI and math libraries) used by the compiler.  When you load the modules, they set your environment up to find the relevant versions.  Again, assuming your shell is '''csh''' or '''tcsh''' then add the following lines to your .cshrc file and re-source it:
  source /usr/share/modules/init/csh
  module purge
  module load comp/intel-9.1.042
  module load lib/mkl-9.1.023
  module load mpi/scali-5
This is a set of modules that will work with the version of GEOS-5 we are trying to compile here.  Other module definitions are possible (you could, for example, look at the module definitions in /home/dasilva/.cshrc).


The model has dependencies on the so-called "Baselibs."  These will generally be prepared in advance for you.  You just need to tell your shell where to find them.  On '''discover''', you can set your environment up to know where the Baselibs are by setting the environment variable BASEDIR as follows:
The model has dependencies on the so-called "Baselibs."  These will generally be prepared in advance for you.  You just need to tell your shell where to find them.  On '''discover''', you can set your environment up to know where the Baselibs are by setting the environment variable BASEDIR as follows: