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