1 |
adcroft |
1.1 |
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
2 |
|
|
<html> |
3 |
|
|
<head> |
4 |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
5 |
|
|
<meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.14-5.0 i686) [Netscape]"> |
6 |
|
|
<meta name="Author" content="AJA@MIT"> |
7 |
|
|
<title>Getting started</title> |
8 |
|
|
</head> |
9 |
|
|
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000"> |
10 |
|
|
|
11 |
|
|
<center> |
12 |
|
|
<h1> |
13 |
|
|
Compile the code</h1></center> |
14 |
adcroft |
1.2 |
We'll walk you through the compilation of "exp4" which simulates zonal |
15 |
adcroft |
1.1 |
flow over a Gaussian bump. |
16 |
|
|
<p>From the top-level source directory, where you installed the code, cd |
17 |
|
|
to verification/exp4: |
18 |
|
|
<blockquote> |
19 |
|
|
<pre>% cd verification/exp4</pre> |
20 |
|
|
</blockquote> |
21 |
adcroft |
1.3 |
There are four sub-directories and a README file. |
22 |
adcroft |
1.1 |
<ul> |
23 |
|
|
<li> |
24 |
|
|
<i>CVS/ </i>is where version information is stored by CVS. You should never |
25 |
|
|
need to enter/read/change this.</li> |
26 |
|
|
|
27 |
|
|
<br><b><i>Please don't delete this directory/information.</i></b> |
28 |
|
|
<li> |
29 |
|
|
<i>code/ </i>contains copies of the source code unique to this experiment |
30 |
|
|
that over-ride the originals. This is our way of customizing the code.</li> |
31 |
|
|
|
32 |
|
|
<li> |
33 |
|
|
<i>input/</i> contains the input files and parameters for this experiment.</li> |
34 |
|
|
|
35 |
|
|
<li> |
36 |
|
|
<i>results/</i> contains a single text file, <i>output.txt</i>, which we |
37 |
|
|
use for quickly assessing the state of the code.</li> |
38 |
|
|
</ul> |
39 |
|
|
Now cd into <i>input/</i> and run the configuration tool <i>genmake</i>: |
40 |
|
|
<blockquote> |
41 |
|
|
<pre>% cd input</pre> |
42 |
|
|
|
43 |
|
|
<pre>% ../../../tools/genmake -mods=../code</pre> |
44 |
|
|
|
45 |
|
|
<pre>% make depend</pre> |
46 |
|
|
</blockquote> |
47 |
|
|
<i>genmake</i> will create a file <i>Makefile </i>and report which packages |
48 |
|
|
are being included/excluded. <i>make depend</i> figures out the file dependancies |
49 |
|
|
that allows <i>make</i> to work efficiently. You'll also notice the number |
50 |
|
|
of files in the current directory has greatly expanded. This are all symbolic |
51 |
|
|
links to the original source code. |
52 |
|
|
<p>You only need to do the above steps once; here after, you can edit the |
53 |
|
|
code and re-compile with <i>make</i>. |
54 |
|
|
<p>Compile and link the code: |
55 |
|
|
<blockquote> |
56 |
|
|
<pre>% make</pre> |
57 |
|
|
</blockquote> |
58 |
|
|
This will take some time, depending on your system. [Hint: compiling on |
59 |
|
|
remotely mounted disks is often really slow] |
60 |
|
|
<p>If all goes well, you're ready to <a href="runModel.html">run the model</a>... |
61 |
|
|
<p> |
62 |
|
|
<hr WIDTH="100%"> |
63 |
|
|
<table CELLSPACING=0 CELLPADDING=0 WIDTH="100%" NOSAVE > |
64 |
|
|
<tr NOSAVE> |
65 |
adcroft |
1.4 |
<td NOSAVE>Last modified on $Date: 2001/10/12 18:04:51 $</td> |
66 |
adcroft |
1.1 |
|
67 |
|
|
<td> |
68 |
|
|
<div align=right>CVS: $Source: /u/gcmpack/mitgcm.org/sealion/getting_started/gettingStarted.html,v |
69 |
adcroft |
1.4 |
$Revision: 1.3 $</div> |
70 |
adcroft |
1.1 |
</td> |
71 |
|
|
</tr> |
72 |
|
|
</table> |
73 |
|
|
|
74 |
|
|
</body> |
75 |
|
|
</html> |