source: palm/trunk/DOC/app/chapter_3.2.html @ 2290

Last change on this file since 2290 was 336, checked in by raasch, 15 years ago

several small bugfixes; some more dvrp changes

  • Property svn:keywords set to Id
File size: 21.1 KB
RevLine 
[5]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
[62]2<html><head>
[97]3<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 3.2</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Marcus Oliver Letzel"> <meta name="CREATED" content="20040726;13164873"> <meta name="CHANGED" content="20050119;9245042"> <meta name="KEYWORDS" content="parallel LES model"> <style>
[62]4<!--
5@page { size: 21cm 29.7cm }
6-->
7</style></head>
8<body style="direction: ltr;" lang="en-US"><h3 style="line-height: 100%;">3.2 Example of a minimum
9configuration
[5]10file</h3>
[62]11<p style="line-height: 100%;">In this chapter a sample
12configuration
[5]13file is described. It contains only instructions which are really
14necessary for the execution of a simple model run (configuration
15files can be much more complex). The example presented here is stored
[62]16in an appropriate <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/INSTALL/.mrun.config">example
17file</a> (containing more than the configuration data presented
18here)
19and can be used, together with the <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/INSTALL/example_p3d">parameter
[97]20file</a> presented in <a href="chapter_4.4.1.html">chapter
214.4.1</a>, for the execution of a simple model run. In chapter 4.4.1
[62]22the
23complete <b>mrun</b> options which are necessary for the
24appropriate
[5]25parameter file are described. Furthermore not all details of the
26configuration file are described here. Therefore you should take a
[62]27look at the <a href="http://www.muk.uni-hannover.de/%7Eraasch/Software/mrun_beschreibung.html">mrun</a>
[5]28documentation (sorry: this is only available in German, so far. If you
29think that you
30would profit from an English version, please give a message to the PALM
31group). </p>
[62]32<p style="line-height: 100%;">The following configuration
33data
[336]34exclusively applies to model runs on the SGI ICE system of the
[5]35HLRN when using several processing elements (i.e. for the parallel
36version of the model). The proper installation of the model is
37presumed (see <a href="chapter_5.0.html">chapter
[62]385.0</a>). Furthermore it is supposed that the user is located in
39the
[336]40directory <tt><font style="font-size: 10pt;" size="2">$HOME/palm/current_version</font></tt>
41&nbsp;on its local computer, where the configuration file (<tt><font style="font-size: 10pt;" size="2">.mrun.config</font></tt>) should reside.
[5]42The configuration file has the following contents (among other things):
[62]43<br>&nbsp;
[336]44</p><pre style="line-height: 100%;"><font style="font-size: 10pt;" size="2">%mainprog          palm.f90<br>%base_directory    $HOME/palm/current_version<br>%base_data         ~/palm/current_version/JOBS<br>%source_path       $base_directory/trunk/SOURCE<br>#<br></font><font style="font-size: 10pt;" size="2">%fopts      -g:-w:-xT:-O3:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-convert:little_endian  lcsgih parallel<br></font><font style="font-size: 10pt;" size="2">%lopts      -g:-w:-xT:-O3:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-Vaxlib                 lcsgih parallel</font><font style="font-size: 10pt;" size="2"><br>#</font><br><font style="font-size: 10pt;" size="2">EC:[[ \$locat = execution]] &amp; &amp; <i>cat </i>RUN_CONTROL </font><br><font style="font-size: 10pt;" size="2">#</font><br><a href="chapter_3.4.html#PARIN"><font style="font-size: 10pt;" size="2">PARIN</font></a><font style="font-size: 10pt;" size="2"> in:job  d3#  $base_data/$fname/INPUT _p3d</font><br><font style="font-size: 10pt;" size="2">#</font><br><a href="chapter_3.4.html#RUN_CONTROL"><font style="font-size: 10pt;" size="2">RUN_CONTROL</font></a><font style="font-size: 10pt;" size="2"> out:loc:tr d3#   $base_data/$fname/MONITORING _rc</font><br><a href="chapter_3.4.html#HEADER"><font style="font-size: 10pt;" size="2">HEADER</font></a><font style="font-size: 10pt;" size="2">      out:loc:tr d3#   $base_data/$fname/MONITORING _header</font><span style="font-family: mon;"><span style="text-decoration: underline;"><br></span><a href="chapter_3.4.html#DATA_1D_PR_NETCDF">DATA_1D_PR_NETCDF</a></span><font style="font-size: 10pt;" size="2">   out:loc:tr pr# ~/palm/current_version/JOBS/$fname/OUTPUT _pr  nc</font></pre>
[5]45<p style="line-height: 100%;"><font face="Thorndale, serif">The first
46five lines specify values of
[62]47so-called environment variables. Such lines begin with a
48&ldquo;%&rdquo;-
49sign. After at least one blank the name of the variable</font> <font face="Thorndale, serif">(e.g.
50</font><tt><i><font face="Thorndale, serif">source_path</font></i></tt><font face="Thorndale, serif">)
[5]51follows and then seperated by at least one blank the value of the
52variable. Again separated by blank t<font face="Thorndale, serif">he
53so-called validity domain</font> can be indicated (later more).
[336]54With the first four variables <b>mrun</b> gets to know in
[62]55which
56directory the source code lies (</font><tt><i><font face="Thorndale, serif">source_path</font></i></tt><font face="Thorndale, serif">),
[336]57the file name of the main program (</font><tt><i><font face="Thorndale, serif">mainprog</font></i></tt><font face="Thorndale, serif">)</font><font face="Thorndale, serif">. Also, two variables are defined which contain path informations used later in the file (<span style="font-style: italic;">base_directory</span>, <span style="font-style: italic;">base_data</span>).&nbsp; <b>mrun
[62]58</b>needs these information, <font color="#000000">because
59for each
[336]60model run the executable is created by compiling the respective source file.</font>
[5]61Normally, only the main program (palm.f90) will be compiled while all
62other object files are just linked. These object files have already
63been created from the source code files during the installation of the
64model
65(see </font><a href="chapter_5.0.html"><font face="Thorndale, serif">chapter
[62]665.0</font></a><font face="Thorndale, serif">).
67<b>mrun</b> uses
[5]68certain standard options for the compilation process. Beyond that you
69can
[62]70declare additional options with the environment variable </font><tt><i><font face="Thorndale, serif">fopts</font></i></tt><font face="Thorndale, serif">.
[5]71Within the value assignment of an environment variable in the
72configuration file no blanks must be
73used. If blanks are necessary they must <font face="Thorndale, serif">be
[62]74replaced </font>by colons (&ldquo;:&rdquo;). <b>mrun</b>
75will
[5]76interpret these colons as blanks (2 colons written one behind the
[97]77other will be interpreted as a colon). Thus in the example above</font> fopts
[336]78has the value<tt><font face="Thorndale, serif"> </font></tt>&ldquo;<tt>-g -w -xT -O3 -cpp -r8 -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -convert little_endian<i><font face="Thorndale, serif"><font color="#000000">&rdquo;</font></font></i></tt><font face="Thorndale, serif"><font color="#000000">.
79Thus a PALM executable is generated using high level optimization (</font></font><font color="#000000"><span style="font-family: monospace;">-O3</span></font><font face="Thorndale, serif"><font color="#000000">).</font></font><font color="#000000"><font face="Thorndale, serif">
[62]80For all other options
[336]81see the compiler manual on the SGI (</font><font size="2"><font face="Cumberland, monospace">man</font></font></font><tt><font color="#000000"> <span style="font-family: Cumberland,monospace;">ifort</span></font></tt><font face="Thorndale, serif"><font color="#000000">).
[62]82Additional libraries
[336]83which the compiler should use may have to be given by
[62]84the environment variable </font></font><tt><font size="2"><font face="Cumberland, monospace"><font color="#000000">lopts</font></font></font></tt><font color="#000000">
[336]85<font face="Thorndale, serif">(loader options).</font></font><font color="#000000"><font face="Thorndale, serif"> </font></font>
[62]86</p><p style="line-height: 100%;"><font color="#000000">Compiler and
[5]87loader options usually differ from computer to computer. In the
88configuration file therefore several value assignments for the
[62]89variables </font><tt><font style="font-size: 10pt;" size="2"><font color="#000000">fopts</font></font></tt><font color="#000000">
90and </font><tt><font style="font-size: 10pt;" size="2"><font color="#000000">lopts</font></font></tt><font color="#000000">
91exist which become active for different computers.</font><font color="#800000">
92<font color="#000000">Which value assignment is used is
93described by
[5]94the so-called validity domain which follows in the appropriate
[62]95variable lines after the value of variables.</font></font><font color="#000000">
[336]96In the example above the entry &ldquo;</font><font color="#000000"><font style="font-size: 11pt; font-style: italic; font-family: monospace;" size="2">lcsgih</font></font><tt><font color="#000000"><span style="font-style: italic; font-family: monospace;">
[62]97</span></font><font color="#000000"><i><font style="font-size: 11pt;" size="2">parallel</font></i></font></tt><font color="#000000">&rdquo;
98stands for </font><tt><font style="font-size: 10pt;" size="2"><font color="#000000">fopts</font></font></tt><font color="#000000">
99and </font><tt><font style="font-size: 10pt;" size="2"><font color="#000000">lopts</font></font></tt><font color="#000000">.
[5]100These lines only become active if a run on the parallel computer of
[336]101the HLRN (</font><tt><i><font style="font-size: 10pt;" size="2">lcsgih</font></i></tt><font color="#000000">)
[62]102on several <font color="#000000">(</font><tt><i><font style="font-size: 10pt;" size="2"><font color="#000000">parallel</font></font></i></tt><font color="#000000">)
[5]103</font>processors is started. The activation takes place when you
104appropriately specify the <span style="font-weight: bold;">mrun</span>
[62]105options </font><tt><font color="#000000">-h</font></tt><font color="#000000">
106and </font><tt><font color="#000000">-K</font></tt><font color="#000000">
[5]107(see below). This way, the validity domain can be limited also for all
108other environment-variables. If no validity domain
[336]109is indicated then the given values of variables are valid for all
[5]110computers. </font>
[62]111</p><p style="line-height: 100%;">After the value
112assignment for the
113variables the so-called error commands follow which have to begin with
114&ldquo;<tt><font style="font-size: 11pt;" size="2">EC:</font></tt>&rdquo;
115in the first column (comment lines begin with &ldquo;<tt>#</tt>&rdquo;).
116Directly
[5]117after the colon Unix commands follow (korn shell syntax) which are
118processed by <b>mrun</b> if errors arise during
[62]119the model run. The command described in the example (<tt><font style="font-size: 10pt;" size="2">cat
[5]120RUN_CONTROL</font></tt>) is executed thereby only on the
[62]121condition that errors during the execution of the model (<tt><font style="font-size: 10pt;" size="2">execution</font></tt>)
122arise. An <b>mrun </b>internal environment variable which
123indicates
[5]124the
[62]125respective abort place in case of errors is <tt><a href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#locat">locat</a></tt>.
[5]126In order to determine the actual value of this variable at the
[62]127execution of <b>mrun</b> the &ldquo;<tt>$</tt>&rdquo;
128- prefix
129must be protected by a &ldquo;\&rdquo; since the configuration
130file has been
131already interpreted once when reading in through <b>mrun</b>
132and the
[5]133value from
[62]134<tt>locat</tt> would then supply the empty character
135string. If
[5]136errors arise during the model run this command
137copies the data written by the model up to then to the local file
138<a href="chapter_3.4.html#RUN_CONTROL">RUN_CONTROL</a>
139on the standard output where they can be checked after
[62]140job end.<font color="#000000"> RUN_CONTROL is an output
141file of the
[5]142model which has to be copied according to the default configuration
143file
144(see below) after the end of the model run to a permanent file of the
145user but this action would not be performed in case of errors
[62]146in the model run, so that the file content would be lost.</font>
147With
[5]148the help of the error command one can secure it nevertheless. </p>
149<p style="line-height: 100%;">Before and/or after
150the error commands in the example file you can find the so-called input
151and/or output commands which are implemented before and/or after the
152model run. </p>
[62]153<p style="line-height: 100%;">After the output commands<font color="#000000">
154<font color="#000000">in the example file t</font>he
155so-called file
156connection statements</font> <font color="#000000">follow
157</font>via
158which tell <span style="font-weight: bold;">mrun</span>
159how to connect
[5]160the local files in the temporary working
161directory of the model with the respective permanent files of the user.
[62]162<b>mrun</b> copies the input and output files in accordance
163with the
[5]164data in these connection statements. The file connection statements are
165explained in detail in the <b>mrun</b>
[62]166description (<a href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#chapter6.3">chapter
[97]1676.3</a>, in German) and are described here only as far as
[5]168necessary. A
169file connection statement usually consists of entries in 5 columns
170whereby all columns are separated from each other by one or more blanks
171(the blanks define the individual columns). In the
172first column the local file name (e.g. <tt><font size="2">PARIN</font></tt>)
173is given as it is addressed by the model. It must begin directly at
174the start of the line. In the second column the so-called file
175attributes
[62]176are given. These determine whether the file is an input file (<tt><font style="font-size: 10pt;" size="2">in</font></tt>)
177or an output file (<tt><font size="2">out</font></tt>),
178whether output
179files are to be transferred to the local computer of the user (<tt><font style="font-size: 10pt;" size="2">tr</font></tt>)
180or whether they are to be archived (<font size="2"><font face="Cumberland, monospace">fl</font></font>).
181If a file has several attributes then they are separated by a <font color="#000000">colon
[5]182in each case .</font> </p>
[62]183<p style="line-height: 100%;">With the entries in the
184third column one
[5]185specifies the conditions under which a file connection statement
186becomes active i.e. under
187which circumstances it is executed by <b>mrun</b>. Then <b>mrun</b>
188copies the appropriate in or output files only if at least one of the
189character strings registered in column 3 (again two or more character
190strings have to be separated from each other by a colon) is
[62]191indicated within the mrun <b>call</b> by the option <a href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#Opt-r">-r</a>.
[5]192Thus a call of the form </p>
[336]193<ul> <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font style="font-size: 10pt;" size="2">mrun - h lcsgih -d abcde -r "d3#"</font></pre></ul>
[62]194<p style="line-height: 100%;">would lead to the fact that
195the input
[5]196file with the local name PARIN is made available and the output files
197RUN_CONTROL and HEADER are copied to permanent files. The output
198files PLOT1D_PAR and PLOT1D_DATA are not copied so that their
199contents are not available to the user after the end of the job. If
[62]200these files are to be copied of <b>mrun</b> then the call
201must be</p>
[336]202<ul> <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font style="font-size: 10pt;" size="2">mrun -h lcsgih -d abcde -r "d3# pr#"</font></pre></ul>
[62]203<p style="line-height: 100%;">Instead of the option -r you
204can
[5]205separately address the file connection statements for input and/or
206output files with the options -i and -o. If one likes to make sure with
207these two options that in the example configuration
208file all file connection statements are actually executed then
209the call must be: </p>
[336]210<ul> <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font style="font-size: 10pt;" size="2">mrun -h lcsgih -d abcde -i "d3#" -o "d3# pr#"</font></pre></ul>
[62]211<p style="line-height: 100%;"><font color="#000000">The
212names of the
[5]213local files assigned permanent files are build from the entries in
214the 4th and 5th column of the file connection statements and the
[62]215value of the <span style="font-weight: bold;">mrun</span>
216option </font><tt><font style="font-size: 10pt;" size="2"><font color="#000000">-d</font></font></tt><font color="#000000">
[5]217in the following way:</font><font color="#800000"> </font>
[62]218</p><ul> <p style="line-height: 100%;">File
219name (inclusive path) = &ldquo;value of
220the 4th column&rdquo; + &ldquo;value of the option <tt><font size="2">-d</font></tt>&rdquo;
221+ &ldquo;value of the 5th column&rdquo;.</p>
222</ul><p style="line-height: 100%;">The 4th column
223contains the path name
224whereby <tt><a href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#fname">$fname</a></tt>
[5]225is replaced by the value indicated for the option <tt><font size="2">-d</font></tt>.
226The 5th column contains the so-called file name extension. The name
[62]227of the permanent file which was copied by <b>mrun</b> to
228the local
[5]229file <tt>PARIN</tt> thereby reads: </p>
[62]230<ul> <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font style="font-size: 10pt;" size="2">~/palm/current_version/JOBS/abcde/INPUT/abcde_p3d.</font></pre></ul>
231<p style="line-height: 100%;">In the same way the names of
232the
[5]233permanent files of the remaining <font color="#000000">file
234connection statements </font>can be formed. </p>
[62]235<p style="line-height: 100%;">With this example
236configuration file
[5]237exactly one input file is copied into the temporary working directory
[62]238of the model. This file has the local name <a href="chapter_3.4.html#PARIN">PARIN</a>
[5]239and contains the steering parameters for the model and has to be
240provided by the user for each model run. </p>
[62]241<p style="line-height: 100%;">The example configuration
242file also
[336]243instructs <b>mrun</b> to copy three output files of the
[62]244model to
[5]245appropriate permanent files of the user at the end of the run.
[62]246There are timestep information (local file name <tt><a href="chapter_3.4.html#RUN_CONTROL">RUN_CONTROL</a></tt>),
[5]247the so-called header file, in which the values of the most selected
248parameters for this run (<tt><a href="chapter_3.4.html#HEADER">HEADER</a></tt>)
249are located, as well as a file with data of horizontally averaged
250vertical profiles
[336]251(<tt><a href="chapter_3.4.html#DATA_1D_PR_NETCDF">DATA_1D_PR_NETCDF</a></tt>).
[5]252A model run does not presuppose neither the file connection statements
253for
254output files nor their activation. But without declaring AND activating
255them usually the data produced by the model
256are lost after the end of the model run! </p>
[62]257<p style="line-height: 100%;">As already mentioned the
258configuration
[5]259file offers a variety of further possibilities to steer the
260execution of the model run. Some of them are described in the next
261chapter. Same applies to possible other options of the <b>mrun</b>
[62]262call. For these please refer to the <a href="http://www.muk.uni-hannover.de/%7Eraasch/Software/mrun_beschreibung.html">mrun</a>
263documentation (in German). An <b>mrun </b>call for the
264execution of a
[5]265model run
[336]266on several processors on the SGI ICE of the HLRN must be
[5]267supplemented by the following options in each case: </p>
[336]268<ul style="font-family: monospace;"> <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font style="font-size: 10pt;" size="2">mrun - K parallel -X ... -T ... -t ... -m ---</font></pre></ul>
[62]269<p style="line-height: 100%;">Only the indication of <tt><font style="font-size: 11pt;" size="2">-K
270parallel</font></tt> causes the parallel execution of the
271run on
[5]272several processors (otherwise a scalar execution on one processor is
273accomplished). In addition to this the number of the
274processing elements which shall be used has to be pre-scribed with the
[62]275option <tt><font style="font-size: 10pt;" size="2">-X</font>
276</tt><font size="2">(</font><font style="font-size: 10pt;" size="2">e.g.
[336]277</font><tt><font style="font-size: 10pt;" size="2">-X 32</font></tt><font size="2">) and the number of tasks (processors) on onde node have to be given by option -T.</font>
[5]278In each case the permitted CPU time in seconds and the required memory
[62]279size in MB must be indicated by the options <tt><font style="font-size: 11pt;" size="2">-t</font></tt>
[5]280and <tt><font style="font-size: 11pt;" size="2">-m</font></tt>,
281respectively<font face="Thorndale, serif">.</font>
[336]282Alternatively, memory and cpu-time demands can be set by the appropriate environment
[5]283variables in the configuration file: </p>
[336]284<blockquote style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">%memory&nbsp; <i>1500</i> lcsgih parallel</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">%cputime <i>1000</i> lcsgih parallel</font></font></tt></blockquote>
[62]285<p style="line-height: 100%;">The values indicated there
286can be
287overridden with the values of the options <tt><font style="font-size: 10pt;" size="2">-t</font></tt>
[5]288and/or <tt><font style="font-size: 10pt;" size="2">-m</font></tt>,
[336]289respectivly.</p><p style="line-height: 100%;"><span style="font-weight: bold;">Warning: When changing the coniguration file, please never use the TAB key!</span> </p>
[62]290<hr><p style="line-height: 100%;"><br>
291<font color="#000080"><font color="#000080"><a href="chapter_3.1.html"><font color="#000080"><img src="left.gif" name="Grafik1" align="bottom" border="2" height="32" width="32"></font></a><a href="index.html"><font color="#000080"><img src="up.gif" name="Grafik2" align="bottom" border="2" height="32" width="32"></font></a><a href="chapter_3.3.html"><font color="#000080"><img src="right.gif" name="Grafik3" align="bottom" border="2" height="32" width="32"></font></a></font></font></p><p style="line-height: 100%;"><i>Last change:&nbsp;</i>
292$Id: chapter_3.2.html 336 2009-06-10 11:19:35Z raasch $</p>
293</body></html>
Note: See TracBrowser for help on using the repository browser.