source: palm/trunk/DOC/app/chapter_3.5.5.html @ 1432

Last change on this file since 1432 was 212, checked in by raasch, 16 years ago

manual updated for changes in the user interface

  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
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
9Compiling and
10linking user-defined code<br>
11</font></h3><p style="line-height: 100%;">Users
12can add their own (modified) user-interface to a PALM-run by carrying
13out the following steps:</p><ol><li>Copy the appropriate default
14(empty) user-interface&nbsp;files<span style="font-family: Courier New,Courier,monospace;">
15user_***.f90</span> to a directory of your choice, e.g.:<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp;
16&nbsp;cd ~/palm/current_version</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;">&nbsp;
17&nbsp;mkdir -p USER_CODE/example</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;">&nbsp;
18&nbsp;cp trunk/SOURCE/user_***.f90&nbsp;
19USER_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
20an 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;">&nbsp;
23&nbsp;%add_source_path&nbsp;&nbsp;
24$base_directory/USER_CODE/$fname</span><br><br>The
25default configuration file (<span style="font-family: Courier New,Courier,monospace;">trunk/SCRIPTS/.mrun.config.default</span>)
26already includes this setting.<br></li><li>Modify the interface
27routines according to your needs.<br></li><li>Start a PALM run
28by executing<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp;
29&nbsp;mrun -d example ...</span><br><br>The files<span style="font-family: Courier New,Courier,monospace;">
30user_***.f90 </span>will be automatically compiled within
31the job and will replace the respective PALM&lsquo;s default user-interface routines.<br></li></ol>The
32above method with including<span style="font-family: Courier New,Courier,monospace;"> $fname </span>in
33the additional source path allows to use different user-interfaces for
34different runs at the same time. Just store the respective
35interface-files in subdirectories<span style="font-family: Courier New,Courier,monospace;">
36USER_CODE/abcd</span>,<span style="font-family: Courier New,Courier,monospace;">
37USER_CODE/cdef</span>, etc. and start <span style="font-weight: bold;">mrun</span> with option
38&ldquo;<span style="font-family: Courier New,Courier,monospace;">-d
39abcd</span>&ldquo;, &ldquo;<span style="font-family: Courier New,Courier,monospace;">-d cdef</span>&ldquo;,
40etc.<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>
41or b) can create new files in the additional source directory. These
42files must have names different from the default PALM source code
43files. In case of b), the user must also copy the default makefile into
44the additional source directory:<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp; &nbsp;cp trunk/SOURCE/Makefile&nbsp;
45USER_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
46modified user-interface files cannot be pre-compiled by using mbuild!</span><br><br>While
47programming user-defined code,
48errors are frequently made. Possible ways of error
49tracing are described in the next chapter. <br><p style="line-height: 100%;">
50&nbsp; </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:&nbsp;</i>
53$Id: chapter_3.5.5.html 212 2008-11-11 09:09:24Z suehring $</p>
54</body></html>
Note: See TracBrowser for help on using the repository browser.