source: palm/trunk/DOC/app/chapter_3.5.5.html @ 21

Last change on this file since 21 was 5, checked in by raasch, 18 years ago

html-documentation added

File size: 5.9 KB
RevLine 
[5]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4  <meta http-equiv="CONTENT-TYPE"
5 content="text/html; charset=windows-1252">
6  <title>PALM chapter 3.5.5</title>
7  <meta name="GENERATOR" content="StarOffice 7  (Win32)">
8  <meta name="AUTHOR" content="Siegfried Raasch">
9  <meta name="CREATED" content="20040802;14050943">
10  <meta name="CHANGED" content="20041117;12180008">
11  <meta name="KEYWORDS" content="parallel LES model">
12  <style>
13        <!--
14                @page { size: 21cm 29.7cm }
15        -->
16        </style>
17</head>
18<body dir="ltr" lang="en-US">
19<h3 style="line-height: 100%;"><font size="4">3.5.5 Compiling and
20linking user-defined code<br>
21</font></h3>
22<p style="line-height: 100%;">The compiling and linking of
23user-defined code into a model run is done via the shellscript
24<a
25 href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html">mrun</a>.
26The simplest (however not the most comfortable) way is by giving the
27filenames of the files containing the user-defined code as an argument
28of the shellscript option <a
29 href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#Opt-s">-s</a>.
30If the user-defined subroutines are located e.g. on the two files <span
31 style="font-family: monospace;">user1.f90</span> and <span
32 style="font-family: monospace;">user2.f90</span>, then
33the <b>mrun</b> call has to be:<br>
34</p>
35<p style="line-height: 100%; margin-left: 40px;"><span
36 style="font-family: monospace;">mrun... -s "user1.f90 user2.f90" ... .</span><br>
37</p>
38<p style="line-height: 100%;">For this call the user has to be in the
39working directory <tt><tt><font style="font-size: 10pt;" size="2">~/palm/current_version/SOURCE</font></tt></tt>,
40because the file with the source code of the main program is located
41here. The main program is compiled with
42each model run (without the appropriate filename given as argument for
43the
44option -s). </p>
45<p style="line-height: 100%;">The call </p>
46<ul>
47  <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font
48 style="font-size: 10pt;" size="2">mrun… -s TEST…,</font></pre>
49</ul>
50<p style="line-height: 100%;">is simpler and causes the compilation
51of all files with suffix <tt><font style="font-size: 10pt;" size="2">.f90</font></tt>
52located in the working
53directory <font face="Thorndale, serif">a</font>nd having
54user write permissions.&nbsp; Unchanged sources of the default model
55have read permission only and therefore are not compiled with that
56call. </p>
57<p style="line-height: 100%;">Typically, users may have different
58versions
59of user-defined code which are to be used for different model runs.
60According to the method just described for starting a certain model
61run,
62the associated user-defined code would have to be copied into the
63working directory and code for other runs may have to be
64removed (otherwise theses files would be compiled as well and the
65routines like <tt><font style="font-size: 10pt;" size="2">user_actions</font></tt>
66would occur twice or several times which would lead to compiling
67errors). This procedure is quite tedious and can lead to errors if
68different
69model runs with restarts are to be carried out at the same time. It is
70better
71to store the different versions of user-defined code in different
72subdirectories
73using the base file name of the respective model run as subdirectory
74name. In this case a line like </p>
75<ul>
76  <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font
77 style="font-size: 10pt;" size="2">% </font><a
78 href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#add_source_path"><font
79 style="font-size: 10pt;" size="2">add_source_path</font></a><font
80 style="font-size: 10pt;" size="2"> $HOME/palm/current_version/SOURCE/USER_CODE/$fname</font></pre>
81</ul>
82<p style="line-height: 100%;">has to be added to the <b>mrun</b>
83configuration file. If you call <b>mrun</b> now with </p>
84<ul>
85  <pre style="margin-bottom: 0.5cm; line-height: 100%;"><font
86 style="font-size: 10pt;" size="2">mrun -d run1  -s “user1.f90 user2.f90”…,</font></pre>
87</ul>
88<p style="line-height: 100%;">the additional entry in the configuration
89file
90causes that the files given as argument of the option -s are also
91looked
92for in the directory <tt><font style="font-size: 10pt;" size="2">$HOME/palm/current_version/SOURCE/USER_CODE/run1</font></tt><font
93 style="font-size: 10pt;" size="2">,</font>
94in case they are not found in the current working directory. The
95specification of <tt><font style="font-size: 10pt;" size="2">-s</font><font
96 size="2">
97TEST</font></tt> in the <b>mrun</b> call now causes compilation of all
98files with suffix <tt><font style="font-size: 10pt;" size="2">.f90</font></tt>
99and user write permissions which are located in the working
100directory or in the directory indicated by <span
101 style="font-family: monospace;">add_source_path</span>. In
102this case no files with the same name are allowed to be in these two
103directories. </p>
104<p style="line-height: 100%;">Further detailed information for linking
105user-defined code with <b>mrun</b> can be found in <a
106 href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#chapter7">chapter
1077</a> of the <b>mrun </b>documentation (only in German). </p>
108<p style="line-height: 100%;">While programming user-defined code,
109errors are frequently made. Possible ways of error
110tracing are described in the next chapter. <br>
111&nbsp; </p>
112<hr>
113<p style="line-height: 100%;"><br>
114<font color="#000080"><font color="#000080"><a href="chapter_3.5.3.html"><font
115 color="#000080"><img src="left.gif" name="Grafik1" align="bottom"
116 border="2" height="32" width="32"></font></a><a href="index.html"><font
117 color="#000080"><img src="up.gif" name="Grafik2" align="bottom"
118 border="2" height="32" width="32"></font></a><a href="chapter_3.6.html"><font
119 color="#000080"><img src="right.gif" name="Grafik3" align="bottom"
120 border="2" height="32" width="32"></font></a></font></font></p>
121<p style="line-height: 100%;"><i>Last change:&nbsp;</i> 15/04/05 (SR)</p>
122</body>
123</html>
Note: See TracBrowser for help on using the repository browser.