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.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> |
---|
4 | <!-- |
---|
5 | @page { size: 21cm 29.7cm } |
---|
6 | --> |
---|
7 | </style></head> |
---|
8 | <body style="direction: ltr;" lang="en-US"><h3 style="line-height: 100%;"><font size="4">3.5.5 |
---|
9 | Compiling and |
---|
10 | linking user-defined code<br> |
---|
11 | </font></h3><p style="line-height: 100%;">Users |
---|
12 | can add their own (modified) user-interface to a PALM-run by carrying |
---|
13 | out the following steps:</p><ol><li>Copy the appropriate default |
---|
14 | (empty) user-interface files<span style="font-family: Courier New,Courier,monospace;"> |
---|
15 | user_***.f90</span> to a directory of your choice, e.g.:<br><br><span style="font-family: Courier New,Courier,monospace;"> |
---|
16 | cd ~/palm/current_version</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
17 | mkdir -p USER_CODE/example</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;"> |
---|
18 | cp trunk/SOURCE/user_***.f90 |
---|
19 | USER_CODE/example<br><br><span style="font-family: Times New Roman,Times,serif; font-weight: bold;">Attention: do not change the filenames!</span><br></span><br></li><li>Set |
---|
20 | an additional path in the configuration file<span style="font-family: Courier New,Courier,monospace;"> |
---|
21 | .mrun.config </span>to allow <span style="font-weight: bold;">mrun |
---|
22 | </span>to find and include these files:<br><br><span style="font-family: Courier New,Courier,monospace;"> |
---|
23 | %add_source_path |
---|
24 | $base_directory/USER_CODE/$fname</span><br><br>The |
---|
25 | default configuration file (<span style="font-family: Courier New,Courier,monospace;">trunk/SCRIPTS/.mrun.config.default</span>) |
---|
26 | already includes this setting.<br></li><li>Modify the interface |
---|
27 | routines according to your needs.<br></li><li>Start a PALM run |
---|
28 | by executing<br><br><span style="font-family: Courier New,Courier,monospace;"> |
---|
29 | mrun -d example ...</span><br><br>The files<span style="font-family: Courier New,Courier,monospace;"> |
---|
30 | user_***.f90 </span>will be automatically compiled within |
---|
31 | the job and will replace the respective PALM‘s default user-interface routines.<br></li></ol>The |
---|
32 | above method with including<span style="font-family: Courier New,Courier,monospace;"> $fname </span>in |
---|
33 | the additional source path allows to use different user-interfaces for |
---|
34 | different runs at the same time. Just store the respective |
---|
35 | interface-files in subdirectories<span style="font-family: Courier New,Courier,monospace;"> |
---|
36 | USER_CODE/abcd</span>,<span style="font-family: Courier New,Courier,monospace;"> |
---|
37 | USER_CODE/cdef</span>, etc. and start <span style="font-weight: bold;">mrun</span> with option |
---|
38 | “<span style="font-family: Courier New,Courier,monospace;">-d |
---|
39 | abcd</span>“, “<span style="font-family: Courier New,Courier,monospace;">-d cdef</span>“, |
---|
40 | etc.<br><br>If the user wants to add additional routines, he/she can a) put them into the default user-interface file <span style="font-family: Courier New,Courier,monospace;">user_additional_routines.f90</span> |
---|
41 | or b) can create new files in the additional source directory. These |
---|
42 | files must have names different from the default PALM source code |
---|
43 | files. In case of b), the user must also copy the default makefile into |
---|
44 | the additional source directory:<br><br><span style="font-family: Courier New,Courier,monospace;"> cp trunk/SOURCE/Makefile |
---|
45 | USER_CODE/example</span><br><br>The makefile must be modified appropriately followinf the "make"-rules in order to allow the new files to be compiled.<br><br><span style="font-weight: bold;">The |
---|
46 | modified user-interface files cannot be pre-compiled by using mbuild!</span><br><br>While |
---|
47 | programming user-defined code, |
---|
48 | errors are frequently made. Possible ways of error |
---|
49 | tracing are described in the next chapter. <br><p style="line-height: 100%;"> |
---|
50 | </p> |
---|
51 | <hr><p style="line-height: 100%;"><br> |
---|
52 | <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> |
---|
53 | $Id: chapter_3.5.5.html 212 2008-11-11 09:09:24Z hellstea $</p> |
---|
54 | </body></html> |
---|