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 |
---|
4 | chapter 3.5.5</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14050943"> <meta name="CHANGED" content="20041117;12180008"> <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%;"><font size="4">3.5.5 |
---|
10 | Compiling and |
---|
11 | linking user-defined code<br> |
---|
12 | </font></h3><p style="line-height: 100%;">Users |
---|
13 | can add their own (modified) user-interface to a PALM-run by carrying |
---|
14 | out the following steps:</p><ol><li>Copy the default |
---|
15 | (empty) user-interface (file<span style="font-family: Courier New,Courier,monospace;"> |
---|
16 | user_interface.f90</span>) to a directory of your choice, e.g.:<br><br><span style="font-family: Courier New,Courier,monospace;"> |
---|
17 | cd ~/palm/current_version</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
18 | mkdir -p USER_CODE/example</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
19 | cp trunk/SOURCE/user_interface.f90 |
---|
20 | USER_CODE/example/user_example.f90</span><br></li><li>Set |
---|
21 | an additional path in the configuration file<span style="font-family: Courier New,Courier,monospace;"> |
---|
22 | .mrun.config </span>to allow <span style="font-weight: bold;">mrun |
---|
23 | </span>to find and include this file:<br><br><span style="font-family: Courier New,Courier,monospace;"> |
---|
24 | %add_source_path |
---|
25 | $base_directory/USER_CODE/$fname</span><br><br>The |
---|
26 | default configuration file (<span style="font-family: Courier New,Courier,monospace;">trunk/SCRIPTS/.mrun.config.default</span>) |
---|
27 | already includes this setting.</li><li>Modify the interface |
---|
28 | routines according to your needs.</li><li>Start a PALM run |
---|
29 | by executing<br><br><span style="font-family: Courier New,Courier,monospace;"> |
---|
30 | mrun -d example ...</span><br><br>The file<span style="font-family: Courier New,Courier,monospace;"> |
---|
31 | user_example.f90 </span>will be automatically compiled within |
---|
32 | the job and will replace PALM‘s default user-interface.<br></li></ol>The |
---|
33 | above method with including<span style="font-family: Courier New,Courier,monospace;"> $fname </span>in |
---|
34 | the additional source path allows to use different user-interfaces for |
---|
35 | different runs at the same time. Just store the respective |
---|
36 | interface-files in subdirectories<span style="font-family: Courier New,Courier,monospace;"> |
---|
37 | USER_CODE/abcd</span>,<span style="font-family: Courier New,Courier,monospace;"> |
---|
38 | USER_CODE/cdef</span>, etc. and start <span style="font-weight: bold;">mrun</span> with option |
---|
39 | “<span style="font-family: Courier New,Courier,monospace;">-d |
---|
40 | abcd</span>“, “<span style="font-family: Courier New,Courier,monospace;">-d cdef</span>“, |
---|
41 | etc.<br><br><span style="font-weight: bold;">The |
---|
42 | modified user-interface file cannot be pre-compiled by using mbuild!</span><br><br>While |
---|
43 | programming user-defined code, |
---|
44 | errors are frequently made. Possible ways of error |
---|
45 | tracing are described in the next chapter. <br><p style="line-height: 100%;"> |
---|
46 | </p> |
---|
47 | <hr><p style="line-height: 100%;"><br> |
---|
48 | <font color="#000080"><font color="#000080"><a href="chapter_3.5.3.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.6.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> |
---|
49 | $Id: chapter_3.5.5.html 62 2007-03-13 02:52:40Z heinze $</p> |
---|
50 | </body></html> |
---|