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