1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
---|
2 | <html><head> |
---|
3 | <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 3.6</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040809;10583400"> <meta name="CHANGED" content="20041112;15013624"> <meta name="KEYWORDS" content="parallel LES model"> <style> |
---|
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.6 Interactive mode and debugging</h3> |
---|
9 | <p style="line-height: 100%;">You can use <b>mrun</b> |
---|
10 | for running PALM |
---|
11 | in batch mode as well as for running it interactively. For interactive |
---|
12 | runs, you must (naturally) be logged in on the respective computer. For |
---|
13 | this computer the subroutines of the model must have |
---|
14 | been precompiled (see <a href="chapter_5.0.html">chapter |
---|
15 | 5.0</a>). Files containing user-defined code must be stored in |
---|
16 | the directory given by the variable<span style="font-family: Courier New,Courier,monospace;"> |
---|
17 | %add_source_path </span>in the mrun-configuration file<span style="font-family: Courier New,Courier,monospace;"> |
---|
18 | .mrun.config</span>.<span style="font-family: monospace;"></span> |
---|
19 | All output-files possibly |
---|
20 | created by the model and requested by the user to be kept after the run |
---|
21 | are copied to |
---|
22 | directories on the local host corresponding to the specifications |
---|
23 | in the configuration file (in this case the file attribute<span style="font-family: Courier New,Courier,monospace;"> tr </span>does not cause transfer to another computer). </p> |
---|
24 | <p style="line-height: 100%;">Since model runs usually |
---|
25 | require large |
---|
26 | amounts of CPU time, interactive runs may not be feasible, since |
---|
27 | in interactive mode CPU time |
---|
28 | is strongly limited on many hosts and runs will be aborted |
---|
29 | after the time limit has been exceeded. However, an interactive run |
---|
30 | makes sense if a suitable debugger is available, |
---|
31 | which may be used for error tracing in the model (here, error tracing |
---|
32 | in |
---|
33 | the user-defined software is meant). The preparations neccessary for |
---|
34 | debugging are described in the following. This |
---|
35 | description is limited to the IBM Regatta "hanni" and "berni" of the |
---|
36 | HLRN. </p> |
---|
37 | <p style="line-height: 100%;">If certain routines of the |
---|
38 | model |
---|
39 | are to be debugged for errors, the complete source code of |
---|
40 | the model, including the user-defined code, must be compiled |
---|
41 | with special debug compiler options. For this purpose, at least the |
---|
42 | following three lines must be included in the <span style="font-weight: bold;">mrun </span>configuration |
---|
43 | file:<br> |
---|
44 | </p><p style="line-height: 100%;"><span style="font-family: Courier New,Courier,monospace;">%compiler_name |
---|
45 | mpxlf95_r |
---|
46 | ibmh parallel debug</span><br style="font-family: Courier New,Courier,monospace;"> |
---|
47 | <span style="font-family: Courier New,Courier,monospace;">%fopts |
---|
48 | -g:-C:-qinitauto=FF:-qrealsize=8:-Q:-q64:-qmaxmem=-1:-qtune=pwr4:</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
49 | |
---|
50 | -qarch=pwr4:-qnosave:-qnoescape:-qflttrap=overflow::zerodivide:</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
51 | |
---|
52 | :invalid::enable:-qsigtrap |
---|
53 | ibmh parallel debug</span><br style="font-family: Courier New,Courier,monospace;"> |
---|
54 | <span style="font-family: Courier New,Courier,monospace;">%lopts |
---|
55 | -g:-C:-qinitauto=FF:-qrealsize=8:-Q:-q64:-qmaxmem=-1:-qtune=pwr4:</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
56 | |
---|
57 | -qarch=pwr4:-qnosave:-qnoescape:-qflttrap=overflow::zerodivide:</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
58 | |
---|
59 | :invalid::enable:-qsigtrap:-lesslsmp |
---|
60 | ibmh parallel debug</span><br style="font-family: monospace;"> |
---|
61 | <br></p> |
---|
62 | <p style="line-height: 100%;">(Attention: in the |
---|
63 | configuration file, |
---|
64 | the compiler and linker options (<span style="font-family: Courier New,Courier,monospace;">fopts |
---|
65 | </span>and<span style="font-family: Courier New,Courier,monospace;"> lopts</span>) |
---|
66 | must be |
---|
67 | written in one line without any blank space before and after the |
---|
68 | colons!)<br> |
---|
69 | </p><p style="line-height: 100%;">Using the compiler |
---|
70 | options "<span style="font-family: Courier New,Courier,monospace;">-g</span>" |
---|
71 | and "<span style="font-family: Courier New,Courier,monospace;">-C</span>", |
---|
72 | debugable code is created |
---|
73 | and check of array bounds is |
---|
74 | switched on during run time. Option "<span style="font-family: Courier New,Courier,monospace;">-qinitauto=FF</span>" |
---|
75 | initializes all |
---|
76 | automatic variables (unfortunately not the global values of modules) to |
---|
77 | NaN.The "<span style="font-family: Courier New,Courier,monospace;">-qflttrap</span>" |
---|
78 | and "<span style="font-family: Courier New,Courier,monospace;">-qsigtrap</span>" |
---|
79 | options are needed |
---|
80 | in order to terminate the run in case of any floating point errors |
---|
81 | (otherwise the run will not terminate and errors can hardly be |
---|
82 | detected).<br> |
---|
83 | </p><p style="line-height: 100%;">The <b>mrun |
---|
84 | </b>call for debugging |
---|
85 | needs |
---|
86 | an extended argument for the option<span style="font-family: Courier New,Courier,monospace;"> </span><font style="font-size: 10pt; font-family: Courier New,Courier,monospace;" size="2">-K</font>:</p><div style="margin-left: 40px; font-family: Courier New,Courier,monospace;">mrun |
---|
87 | ... -K “parallel debug” -s ”*.f90" ... .</div><p style="line-height: 100%;">The argument of option<span style="font-family: Courier New,Courier,monospace;"> -s </span><span style="font-family: Courier New,Courier,monospace;"></span>must |
---|
88 | list all source code files of the default PALM code. </p> |
---|
89 | <p style="line-height: 100%;">After compiling, the |
---|
90 | debugger |
---|
91 | <b>TotalView</b> is automatically called by <span style="font-weight: bold;">mrun</span>. With its |
---|
92 | assistance the user |
---|
93 | has to start |
---|
94 | the program execution manually, to set breakpoints, etc.. User manuals |
---|
95 | of <b>TotalView</b> are available <a href="http://www.hlrn.de/doc/totalview/index.html">online</a>. |
---|
96 | </p><p style="line-height: 100%;">Program crashes |
---|
97 | caused by errors in the |
---|
98 | user-defined code should usually be found |
---|
99 | unassisted. If the termination point lies outside the user code (in the |
---|
100 | default model code), the PALM group can be asked for |
---|
101 | assistance, but please do not expect any quick response. It is |
---|
102 | emphasized again that error tracing and programming |
---|
103 | of |
---|
104 | user-defined code requires more or less precise knowledge of the |
---|
105 | internal structure of PALM (see beginning of <a href="chapter_3.5.html">chapter |
---|
106 | 3.5</a>). <br> |
---|
107 | </p> |
---|
108 | <hr><p style="line-height: 100%;"><br> |
---|
109 | <font color="#000080"><font color="#000080"><a href="chapter_3.5.5.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.7.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: </i> |
---|
110 | $Id: chapter_3.6.html 83 2007-04-19 16:27:07Z fricke $</p> |
---|
111 | </body></html> |
---|