GEOS-5 Checkout and Build Instructions: Difference between revisions

Line 36: Line 36:


=== 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.
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:
setenv BASEDIR /home/dasilva/silo/Baselibs/x86_64-unknown-linux-gnu/ifort
In fact, it's a good idea to add this line to your .cshrc file too.
Now, with that set, navigate to the source directory:
% cd GEOSagcm/src
At this point, you can build the issuing the following command:
% gmake install
If you do that, go away and take a coffee break.  A long one.  This may take an hour or more to build.  There are a couple of ways to speed this process up.  One way is to build the code without optimization:
% gmake install FOPT=-g
The code builds faster in this instance, but be warned that without optimization any generated code will run very slowly.
A better way is to do a parallel build.  To do this, start an interactive queue (on '''discover'''):
% qsub -I -W group_list=g0604 -N g5Debug -l ncpus=8 -l walltime=12:00:00 -S /bin/tcsh -V -j eo
Note that the string following "group_list=" is your group-id code.  It's the project that gets charged for the computer time you use.  If you're not on "g0604" that's okay, the queue system will let you know and it won't start your job.  To find out which group you belong to, issue the following command:
% getsponsor
and you'll get a table of sponsor codes available to you.  Enter one of those in the group_list string and try again.