source: palm/trunk/DOC/app/chapter_3.6.html @ 5

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

html-documentation added

File size: 7.4 KB
Line 
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.6</title>
7  <meta name="GENERATOR" content="StarOffice 7  (Win32)">
8  <meta name="AUTHOR" content="Siegfried Raasch">
9  <meta name="CREATED" content="20040809;10583400">
10  <meta name="CHANGED" content="20041112;15013624">
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%;">3.6 Interactive mode and debugging</h3>
20<p style="line-height: 100%;">You can use <b>mrun</b> for running PALM
21in batch mode as well as for running it interactively. For interactive
22runs, you must (naturally) be logged in on the respective computer. For
23this computer the subroutines of the model must have
24been precompiled (see <a href="chapter_5.0.html">chapter
255.0</a>). Furthermore, the working directory
26(<tt><font style="font-size: 10pt;" size="2">~/palm/current_version/SOURCE</font></tt>)
27must contain all default source code files of the model (<span
28 style="font-family: monospace;">*.f90</span>), the <b>mrun</b>
29configuration file (<span style="font-family: monospace;">.mrun.config</span>)
30the Makefile (<span style="font-family: monospace;">Makefile</span>)
31and the files which contain the user-defined code (the default
32user-interface file <span style="font-family: monospace;">user_interface.f90</span>
33have to be removed from the directory). All output-files possibly
34created by the model and requested by the user to be kept after the run
35are copied to
36directories on the local host corresponding to the specifications
37in the configuration file (in this case the file attribute <a
38 href="http://www.muk.uni-hannover.de/institut/software/mrun_beschreibung.html#tr">tr</a>
39does not cause transfer to another computer). </p>
40<p style="line-height: 100%;">Since model runs usually require large
41amounts of CPU time, interactive runs are usually not feasible, since
42in interactive mode CPU time
43is strongly limited on many hosts and runs will be aborted
44after the time limit has been exceeded. However, an interactive run
45makes sense if a suitable debugger is available,
46which may be used for error tracing in the model (here, error tracing
47in
48the user-defined software is meant). The preparations neccessary for
49debugging are described in the following. This
50description is limited to the IBM Regatta "hanni" and "berni" of the
51HLRN. </p>
52<p style="line-height: 100%;">If certain routines of the model
53are to be debugged for errors, the complete source code of
54the model, including the user-defined code, must be compiled
55with special debug compiler options. For this purpose, at least the
56following three lines must be included in the <span
57 style="font-weight: bold;">mrun </span>configuration file:<br>
58</p>
59<p style="line-height: 100%;"><span style="font-family: monospace;">%compiler_name&nbsp;&nbsp;&nbsp;&nbsp;
60mpxlf95_r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
61ibmh parallel debug</span><br style="font-family: monospace;">
62<span style="font-family: monospace;">%fopts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
63-g:-C:-qinitauto=FF:-qrealsize=8:-Q:-q64:-qmaxmem=-1:-qtune=pwr4:<br>
64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
65-qarch=pwr4:-qnosave:-qnoescape:-qflttrap=overflow::zerodivide:<br>
66&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
67:invalid::enable:-qsigtrap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
68ibmh parallel debug</span><br style="font-family: monospace;">
69<span style="font-family: monospace;">%lopts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
70-g:-C:-qinitauto=FF:-qrealsize=8:-Q:-q64:-qmaxmem=-1:-qtune=pwr4:<br>
71&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
72-qarch=pwr4:-qnosave:-qnoescape:-qflttrap=overflow::zerodivide:<br>
73&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
74:invalid::enable:-qsigtrap:-lesslsmp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
75ibmh parallel debug</span><br style="font-family: monospace;">
76<br>
77</p>
78<p style="line-height: 100%;">(Attention: in the configuration file,
79the compiler and linker options (<span style="font-family: monospace;">fopts</span>
80and <span style="font-family: monospace;">lopts</span>) must be
81written in one line without any blank space before and after the
82colons!)<br>
83</p>
84<p style="line-height: 100%;">Using the compiler options "<span
85 style="font-family: monospace;">-g</span>" and "<span
86 style="font-family: monospace;">-C</span>", debugable code is created
87and check of array bounds is
88switched on during run time. Option "-qinitauto=FF" initializes all
89automatic variables (unfortunately not the global values of modules) to
90NaN.The "<span style="font-family: monospace;">-qflttrap</span>" and "<span
91 style="font-family: monospace;">-qsigtrap</span>" options are needed
92in order to terminate the run in case of any floating point errors
93(otherwise the run will not terminate and errors can hardly be
94detected).<br>
95</p>
96<p style="line-height: 100%;">The <b>mrun </b>call for debugging
97needs
98an extended argument for the option <tt><font style="font-size: 10pt;"
99 size="2">-K</font></tt><font style="font-size: 10pt;" size="2">:</font>
100</p>
101<ul>
102  <p style="line-height: 100%;"><tt><font style="font-size: 10pt;"
103 size="2">mrun ... -K “parallel debug” -s ”*.f90" ... .<br>
104  </font></tt></p>
105</ul>
106<p style="line-height: 100%;">The argument of option <tt><font
107 style="font-size: 10pt;" size="2">-s</font></tt>
108must list all source code files of the model. </p>
109<p style="line-height: 100%;">After compiling, the debugger
110<b>TotalView</b> is automatically called by <span
111 style="font-weight: bold;">mrun</span>. With its assistance the user
112has to start
113the program execution manually, to set breakpoints, etc.. User manuals
114of <b>TotalView</b> are available <a
115 href="http://www.hlrn.de/doc/totalview/index.html">online</a>. </p>
116<p style="line-height: 100%;">Program crashes caused by errors in the
117user-defined code should usually be found
118unassisted. If the termination point lies outside the user code (in the
119default model code), the PALM developer group had possibly be asked for
120assistance. It is emphasized again that error tracing and programming
121of
122user-defined code requires more or less precise knowledge of the
123internal structure of PALM (see beginning of <a href="chapter_3.5.html">chapter
1243.5</a>). <br>
125&nbsp; </p>
126<hr>
127<p style="line-height: 100%;"><br>
128<font color="#000080"><font color="#000080"><a href="chapter_3.5.5.html"><font
129 color="#000080"><img src="left.gif" name="Grafik1" align="bottom"
130 border="2" height="32" width="32"></font></a><a href="index.html"><font
131 color="#000080"><img src="up.gif" name="Grafik2" align="bottom"
132 border="2" height="32" width="32"></font></a><a href="chapter_3.7.html"><font
133 color="#000080"><img src="right.gif" name="Grafik3" align="bottom"
134 border="2" height="32" width="32"></font></a></font></font></p>
135<p style="line-height: 100%;"><i>Last change:&nbsp;</i> 15/04/05 (SR)</p>
136</body>
137</html>
Note: See TracBrowser for help on using the repository browser.