source: palm/trunk/TUTORIAL/SOURCE/runs_with_mrun.tex @ 945

Last change on this file since 945 was 945, checked in by maronga, 12 years ago

added/updated several tutorial files

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 33.8 KB
RevLine 
[945]1% $Id: runs_with_mrun.tex 945 2012-07-17 15:43:01Z maronga $
2\input{header_tmp.tex}
3%\input{../header_lectures.tex}
4
5\usepackage[utf8]{inputenc}
6\usepackage{ngerman}
7\usepackage{pgf}
8\usetheme{Dresden}
9\usepackage{subfigure}
10\usepackage{units}
11\usepackage{multimedia}
12\usepackage{hyperref}
13\newcommand{\event}[1]{\newcommand{\eventname}{#1}}
14\usepackage{xmpmulti}
15\usepackage{tikz}
16\usetikzlibrary{shapes,arrows,positioning}
17\def\Tiny{\fontsize{4pt}{4pt}\selectfont}
18\usepackage{amsmath}
19\usepackage{amssymb}
20\usepackage{multicol}
21\usepackage{pdfcomment}
22\usepackage{graphicx}
23\usepackage{listings}
24\lstset{showspaces=false,language=fortran,basicstyle=
25        \ttfamily,showstringspaces=false,captionpos=b}
26
27\institute{Institut fÌr Meteorologie und Klimatologie, Leibniz UniversitÀt Hannover}
28\date{last update: \today}
29\event{PALM Seminar}
30\setbeamertemplate{navigation symbols}{}
31
32\setbeamertemplate{footline}
33  {
34    \begin{beamercolorbox}[rightskip=-0.1cm]&
35     {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}}
36    \end{beamercolorbox}
37    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,
38      leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot}
39      {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber}
40    \end{beamercolorbox}
41    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
42    \end{beamercolorbox}
43  }
44%\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.pdf}}
45
46\title[Carrying out runs using mrun]{Carrying out runs using \texttt{mrun}}
47\author{Siegfried Raasch}
48
49\begin{document}
50
51% Folie 1
52\begin{frame}
53\titlepage
54\end{frame}
55
56\section{Carrying out runs using mrun}
57\subsection{Carrying out runs using mrun}
58
59% Folie 2
60\begin{frame}
61   \frametitle{What is \texttt{mrun}?}
62   \begin{itemize}
63      \item<1-> \texttt{mrun} (\textbf{m}odel \textbf{run}) is a shell script (using
64      \texttt{ksh}-syntax) which can be used to compile and run programs, including
65      the handling of input/output files.
66      \item<2-> The \texttt{mrun}-command has a number of options to control the
67      program execution\\
68         \quad \footnotesize \texttt{mrun -d example\_cbl -h lcsgih -K parallel -X8 -T2 ...}\\
69         \normalsize All options including a short description can be displayed by entering\\
70         \quad \footnotesize \texttt{mrun ?}
71      \item<3-> \normalsize The shellscript execution is also controlled by a configuration file with default name \texttt{.mrun.config} 
72   \end{itemize}
73\end{frame}
74
75% Folie 3
76\begin{frame}
77   \tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.1\textwidth, font=\scriptsize]
78   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.22\textwidth,
79   font=\scriptsize]
80   \tikzstyle{info} = [rectangle, text width=0.15\textwidth, font=\scriptsize]
81   \tikzstyle{white} = [rectangle, text width=0.7\textwidth, font=\scriptsize]
82   \tikzstyle{dummy} = [rectangle, text width=0.3\textwidth, font=\scriptsize]
83   \tikzstyle{line} = [draw, -]
84   \tikzstyle{alert} = [rectangle, draw, text width=0.77\textwidth, font=\scriptsize]
85 
86   \scriptsize
87   \frametitle{Carrying Out Runs Using \texttt{mrun}}
88   Carrying out a program run typically needs two steps:\\
89   1. compilation\\
90   \quad \texttt{f90  ...  file1.f90 file2.f90 ...}\\
91   \onslide<2-> 2. execution\\
92   \quad \texttt{a.out}\\
93   \vspace{1mm}
94   \onslide<3->Besides, a program needs input data and creates output data:\\
95   
96   \onslide<4->\begin{tikzpicture}[auto, node distance=0]
97      \node [green] (first) {\textbf{a.out/} };
98      \node [dummy, right=0.1cm of first] (second) {};
99     
100      \node [yellow, above=0.5cm of second] (third) {\textbf{parameter for steering}};
101      \node [yellow, below=0.5cm of third] (fourth) {\textbf{control output}};
102      \node [yellow, below=0.3cm of fourth] (fifth) {\textbf{output for analysis}};
103     
104      \node [info, above=-0.1cm of third] (sixth) {input file};
105      \node [info, above=-0.1cm of fourth] (seventh) {output file 1};
106      \node [info, above=-0.1cm of fifth] (eight) {output file 2};
107
108      \draw [->] (third.west) -- (first.north);
109      \draw [->] (first.east) -- (fourth.west);
110      \draw [->] (first.south) -- (fifth.west);
111     
112      \uncover<5->{\node [white, right=0.25cm of third] (ninth) {
113         \texttt{OPEN (11, FILE='PARIN', FORM='FORMATTED')}};}
114      \uncover<5->{\node [white, right=0.25cm of fourth] (tenth) {
115         \texttt{OPEN (15, FILE='RUN\_CONTROL', FORM='FORMATTED')}};}
116      \uncover<5->{\node [white, right=0.25cm of fifth] (eleventh) {
117         \texttt{OPEN (40, FILE=‘DATA\_1D\_PR\_NETCDF', FORM='FORMATTED')}};}
118   \end{tikzpicture}
119   
120   \vspace{1mm}
121   \scriptsize
122   \onslide<6->\textcolor{red}{Problems: The user has to copy or rename output files, if
123   he/she wants to run the program more than once and if he concurrently wants to keep
124   the files from the former run(s).
125   If he/she is using different input parameter files for steering, these files also have
126   to be copied into the working directory before the program is executed.}\\
127   \ \\
128   \begin{tikzpicture}[auto, node distance=0]
129      \uncover<7->{\node [alert] (alert) {\textcolor{red}{It is therefore very desirable
130      to automate these tasks!}};}
131   \end{tikzpicture}
132\end{frame}
133
134% Folie 4
135\begin{frame}
136   \tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.45\textwidth, font=\scriptsize]
137   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.18\textwidth, font=\scriptsize]
138   \tikzstyle{yellowsmall} = [rectangle, draw, fill=yellow!20, text width=0.10\textwidth, font=\scriptsize]
139   \tikzstyle{dummy} = [rectangle, text width=0.01\textwidth, font=\tiny]
140   
141   \frametitle{\texttt{mrun}: Principal Mode of Operation (I)}
142   \texttt{mrun} runs a program (in our case the PALM model) by carrying out the
143   following principle tasks in a sequential order:\\
144   \scriptsize
145   \begin{enumerate}
146      \item<2-> Create a temporary working directory and change into this directory:\\
147      \quad \texttt{mkdir <tempdir>/<username>.<randomnumber>}\\
148      \quad \texttt{cd <tempdir>/<username>.<randomnumber>}\\
149      \ \\
150      The path of \texttt{<tempdir>} is given in the configuration file
151      \texttt{.mrun.config} by the environment variable \texttt{tmp\_user\_catalog}, e.g.:\\
152           \quad \texttt{\%tmp\_user\_catalog  /tmp \hspace{30mm} <hi>  parallel}\\
153           \ \\
154           \onslide<3-> On SGI-ICE: \\
155           \quad \texttt{\%tmp\_user\_catalog  /gfs2/work/<username>
156           \hspace{5mm} <hi>  lcsgih parallel}
157           \begin{center}
158              \begin{tikzpicture}[auto, node distance=0]
159            \uncover<4->{\node [green] (green) {/tmp/$<$username$>$.$<$randomnumber$>$};}
160         \end{tikzpicture}
161           \end{center}
162           \item<5-> Copy the input files from a directory of the user into this working directory:\\
163           \scriptsize
164           \onslide<6->\hspace{-15mm} \texttt{cp <user\_input\_file1>
165           /tmp/<username>.<randomnumber>/<temporary\_input\_file1>}\\
166      \hspace{-15mm} \texttt{cp <user\_input\_file2>
167      /tmp/<username>.<randomnumber>/<temporary\_input\_file2>}
168      \begin{center}
169              \begin{tikzpicture}[auto, node distance=0]
170             
171            \uncover<8->{\node [green] (green) {/tmp/$<$username$>$.$<$randomnumber$>$};}
172       
173            \uncover<7->{\node [yellowsmall, above=0.1cm of green] (yellow2) {JOBS/};}
174            \uncover<7->{\node [yellow, left=0.2cm of yellow2] (yellow1) {current\_version/};}
175            \uncover<7->{\node [yellow, right=0.2cm of yellow2] (yellow3) {example\_cbl/};}
176            \uncover<7->{\node [yellowsmall, right=0.2cm of yellow3] (yellow4) {INPUT/};}
177           
178            \draw<7-> [-] (yellow1.east) -- (yellow2.west);
179            \draw<7-> [-] (yellow2.east) -- (yellow3.west);
180            \draw<7-> [-] (yellow3.east) -- (yellow4.west);
181           
182            \node [dummy, right=0.1cm of yellow4] (dummy1) {};
183            \node [dummy, right=2.055cm of green] (dummy2) {};
184           
185            \draw<9-> [-] (yellow4.east) -- (dummy1.center);
186            \draw<9-> [-] (dummy1.center) -- (dummy2.center);
187            \draw<9-> [->] (dummy2.center) -- (green.east);
188           
189         \end{tikzpicture}
190           \end{center}
191     
192        \end{enumerate}
193
194\end{frame}
195
196% Folie 5
197\begin{frame}
198   \tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.45\textwidth, font=\scriptsize, minimum height=0.6cm]
199   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.18\textwidth, font=\scriptsize, minimum height=0.6cm]
200   \tikzstyle{dummy} = [rectangle, text width=0.01\textwidth, font=\scriptsize, minimum height=0.6cm]
201   
202   \frametitle{\texttt{mrun}: Principal Mode of Operation (II)}
203
204        \begin{enumerate}
205      \setcounter{enumi}{2}
206           \item<1-> Copy the pre-compiled routines to the temporary working directory:\\
207     
208      \begin{center}
209              \begin{tikzpicture}[auto, node distance=0]
210                 \uncover<2->{\node [yellow] (yellow) {current\_version/};}
211                 \uncover<1->{\node [dummy, right=0.0cm of yellow] (dummy1) {};}
212                 \uncover<2->{\node [green, right=0.2cm of yellow] (green1) {MAKE\_DEPOSITORY\_\textit{parallel}/};}
213                 \uncover<1->{\node [dummy, right=0.2cm of green1] (dummy2) {};}
214            \uncover<3->{\node [green, below=0.5cm of dummy1] (green2) {/tmp/$<$username$>$.$<$randomnumber$>$};}
215             \uncover<1->{\node [dummy, below=0.5cm of dummy2] (dummy3) {};}
216             \uncover<4->{\node [dummy, right=0.0cm of dummy3] (text) {Makefile\\
217                 *.f90\\
218                 *.o\\
219                 ...\\ \ \\};}
220             
221             \draw<2-> [-] (yellow.east) -- (green1.west);
222             \draw<4-> [-] (green1.east) -- (dummy2.center);
223             \draw<4-> [-] (dummy2.center) -- (dummy3.center);
224             \draw<4-> [->] (dummy3.center) -- (green2.east);
225              \end{tikzpicture}
226           \end{center}
227           
228           \item<5-> Compile the main program and use pre-compiled object files:\\
229     \quad \texttt{f90 palm.f90 *.o ...   ( make Makefile)}
230      \item<6-> Execute the program:\\
231     \quad \texttt{a.out}
232   \end{enumerate}
233\end{frame}
234
235% Folie 6
236\begin{frame}
237   \tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.45\textwidth, font=\scriptsize, minimum height=0.6cm]
238   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.18\textwidth, font=\scriptsize, minimum height=0.6cm]
239   \tikzstyle{dummy} = [rectangle, text width=0.01\textwidth, font=\scriptsize, minimum height=0.6cm]
240   
241   \frametitle{\texttt{mrun}: Principal Mode of Operation (III)}
242
243        \begin{enumerate}
244      \setcounter{enumi}{5}
245           \item<1-> Copy the output files from the working directory to a (permanent) directory of the user:\\
246       \scriptsize \hspace{-16mm} \texttt{cp /tmp/<username>.<randomnumber>/<temporary\_output\_file1> <user\_output\_file1>}\\
247      \hspace{-16mm} \texttt{cp /tmp/<username>.<randomnumber>/<temporary\_output\_file2> <user\_output\_file2>}\\
248     
249      \begin{center}
250              \begin{tikzpicture}[auto, node distance=0]
251            \uncover<2->{\node [yellow] (yellow1) {MONITORING/};}
252
253            \uncover<2->{\node [dummy, right=0.2cm of yellow1] (dummy2) {};}
254            \uncover<2->{\node [dummy, above=0.2cm of dummy2] (dummy1) {};}
255            \uncover<2->{\node [dummy, below=0.2cm of dummy2] (dummy3) {};}
256           
257            \uncover<2->{\node [yellow, left=0.2cm of dummy3] (yellow2) {OUTPUT/};}
258            \uncover<2->{\node [yellow, left=0.2cm of yellow2] (yellow3) {example\_cbl/};}
259            \uncover<2->{\node [yellow, left=0.2cm of yellow3] (yellow4) {JOBS/};}
260            \uncover<2->{\node [yellow, left=0.2cm of yellow4] (yellow5) {current\_version/};}
261                                             
262                 \uncover<2-3>{\node [green, left=5.0cm of dummy1] (green) {/tmp/$<$username$>$.$<$randomnumber$>$};}
263                 
264            \draw<2-3> [-] (green.east) -- (dummy1.center);
265            \draw<2-3> [-] (dummy2.center) -- (dummy1.center);
266            \draw<2-3> [-] (dummy3.center) -- (dummy1.center);
267           
268            \draw<2-3> [->] (dummy2.center) -- (yellow1.east);
269            \draw<2-3> [->] (dummy3.center) -- (yellow2.east);
270           
271            \draw<2-> [-] (yellow2.west) -- (yellow3.east);
272            \draw<2-> [-] (yellow3.west) -- (yellow4.east);
273            \draw<2-> [-] (yellow4.west) -- (yellow5.east);
274               
275              \end{tikzpicture}
276           \end{center}
277           
278           \item<3-> Delete the temporary working directory\\
279      \quad \texttt{rm -rf /tmp/<username>.<randomnumber>}\\
280      \onslide<5->\textcolor{red}{Question: How does \texttt{mrun} know which files have to be copied and where from or where to they have to be copied?}
281
282   \end{enumerate}
283\end{frame}
284
285% Folie 7
286\begin{frame}
287   \tikzstyle{small} = [rectangle, text width=0.08\textwidth, font=\scriptsize]
288   \tikzstyle{large} = [rectangle, text width=0.45\textwidth, font=\scriptsize]
289   \tikzstyle{box} = [rectangle, draw, text width=0.2\textwidth, font=\scriptsize]
290   \tikzstyle{boxbig} = [rectangle, draw, text width=0.4\textwidth, font=\scriptsize]
291   \tikzstyle{dummy} = [rectangle, text width=0.0\textwidth, font=\scriptsize, minimum height=0.5cm]
292   
293   \frametitle{Steering File Copy by the Configuration File (I)}
294   \scriptsize
295   \textbf{Copying of files is controlled by so called \textit{file connection statements}. They connect local files in the temporary working directory with permanent files residing in the directory of the user.}\\
296   \vspace{1mm}
297   Principle example of a file connection statement (for the PALM parameter file):
298   \vspace{-3mm}
299   \begin{center}
300           \begin{tikzpicture}[auto, node distance=0]
301         \uncover<1->{\node [small] (part1) {\texttt{PARIN}};}
302         \uncover<1->{\node [dummy, left=-0.2cm of part1] (dummy1) {};}
303         \uncover<1->{\node [dummy, below=1.25cm of dummy1] (dummy3) {};}
304         \uncover<1->{\node [small, right=0.0cm of part1] (part2) {\quad \texttt{in}};}
305         \uncover<1->{\node [dummy, right=0.0cm of part2] (dummy2) {};}
306         \uncover<1->{\node [small, right=0.2cm of part2] (part3) {\texttt{d3\#}};}
307              \uncover<1->{\node [large, right=0.0cm of part3] (part4) {\texttt{\~{}/palm/current\_version/JOB/INPUT}};}
308              \uncover<1->{\node [small, right=0.0cm of part4] (part5) {\texttt{\_p3d}};}
309              \uncover<1->{\node [small, right=0.2cm of part5] (part6) {\texttt{( \textcolor{red}{nc} )}};}
310                   
311         \uncover<2->{\node [boxbig, below=1.25cm of dummy2] (box1) {local filename in the working directory (must correspond to the filename in the \texttt{OPEN} statement of the program)};}
312              \draw<2-> [->] (dummy3.north) -- (dummy1.south);
313             
314              \uncover<3->{\node [box, below=0.7cm of part2] (box2) {file attributes};}
315              \draw<3-> [->] (box2.north) -- (part2.south);
316             
317              \uncover<4->{\node [box, below=0.2cm of part3] (box3) {activating string};}
318              \draw<4-> [->] (box3.north) -- (part3.south);
319                     
320              \uncover<5->{\node [box, below=0.2cm of part4] (box4) {directory in which the permanent user file resides};}
321              \draw<5-> [->] (box4.north) -- (part4.south);
322             
323         \uncover<6->{\node [box, below=0.2cm of part5] (box5) {suffix of the permanent filename};}
324              \draw<6-> [->] (box5.north) -- (part5.south);
325             
326         \uncover<7->{\node [box, below=1.0cm of part6] (box6) {additional suffix for netCDF files};}
327              \draw<7-> [->] (box6.north) -- (part6.south);   
328           \end{tikzpicture}
329        \end{center}
330   
331   \onslide<8->The full name of the permanent file results from the directory name, the suffix and the value of \texttt{mrun}-Option \texttt{-d}, which defines the so-called \textbf{base name} of all files handled by \texttt{mrun}:\\
332   \quad \texttt{mrun -d \textcolor{blue}{example\_cbl} ...}\\
333   gives the filename\\
334   \quad \texttt{\~{}/palm/current\_version/JOB/INPUT/\textcolor{blue}{example\_cbl}\_p3d}\\
335   \quad \texttt{( ... /\textcolor{blue}{example\_cbl}\_p3d\textcolor{red}{.nc} )}
336   
337\end{frame}
338
339% Folie 8
340\begin{frame}
341   \frametitle{Steering File Copy by the Configuration File (II)}
342   \scriptsize
343   \onslide<1-> The \textbf{base name} can additionally be a part of the directory name
344   by using \texttt{\$fname} in the directory column of the file connection statement:\\
345   \quad \texttt{PARIN in d3\# \~{}/palm/current\_version/JOBS/\$fname/INPUT \_p3d}\\
346   \ \\
347   \onslide<2-> Using the call\\
348   \quad \texttt{mrun -d abcde ...}\\
349   the input file will be expected under\\
350   \quad \texttt{\~{}/palm/current\_version/JOBS/abcde/INPUT/abcde\_p3d }\\
351   \ \\
352   \onslide<3-> In this way, all files handled by the \texttt{mrun}-call are stored in
353   the same subdirectory (abcde/) and will have the same string (\texttt{abcde}) as
354   part of their names, so they can be easily identified as ''belonging'' to the model
355   run initiated by that \texttt{mrun} call.\\
356   \ \\
357   \onslide<4-> Instead of always writing the full path name (i.e.
358   \texttt{\~{}/palm/current\_version/JOBS}), an environment variable can be declared for
359   this at the beginning of the configuration file and be used in the file
360   connection statements:\\
361   \quad \texttt{\%base\_data  \~{}/palm/current\_version/JOBS}\\
362   \quad \texttt{PARIN in d3\#  \$base\_data/\$fname/INPUT \_p3d}\\
363   \ \\
364   \onslide<5-> This easily allows to change the directories for all input/output files
365   by just changing the value of \texttt{base\_data}.
366   
367\end{frame}
368
369% Folie 9
370\begin{frame}
371   \frametitle{Steering File Copy by the Configuration File (III)}
372   \scriptsize
373   \onslide<1-> File connection statements which shall be carried out,
374   have to be activated by giving their activation string in the
375   \texttt{mrun}-option \texttt{-r}:\\
376   \quad \texttt{PARIN in d3\# \~{}/palm/current\_version/JOBS/\$fname/INPUT \_p3d}\\
377   \ \\
378   \onslide<2-> The permanent file
379   \texttt{\~{}/palm/current\_version/JOBS/example\_cbl/INPUT/example\_cbl\_p3d} 
380   will only be copied to the local file PARIN by using the call:\\
381   \quad \texttt{mrun -d example\_cbl -r ''d3\#'' ...}\\
382   \ \\
383   \onslide<3-> \textbf{Example for an output file:}\\
384   The file connection statement\\
385   \quad \texttt{DATA\_1D\_PR\_NETCDF out:loc pr\# 
386   \~{}/palm/current\_version/JOBS/\$fname/OUTPUT \_pr nc}\\
387   \onslide<4-> will copy (after program execution) the local file
388   \texttt{DATA\_1D\_PR\_NETCDF} to the permanent file
389   \texttt{\~{}/palm/current\_version/JOBS/example\_cbl/OUTPUT/example\_cbl\_pr.nc} if
390   \texttt{mrun} is called with the options\\
391   \quad \texttt{mrun -d example\_cbl -r ''d3\# pr\#'' ...}
392   
393\end{frame}
394
395% Folie 10
396\begin{frame}
397   \frametitle{Steering File Copy by the Configuration File (IV)}
398   \scriptsize
399   \onslide<1-> \texttt{mrun} never replaces/overwrites existing files!\\
400   \ \\
401   Instead, new, so-called file cycles are created.\\
402   If an output file, e.g.\\
403   \quad \texttt{\~{}/palm/current\_version/JOBS/example\_cbl/MONITORING/example\_cbl\_rc}\\
404   \ \\
405   has been created from a first call of \texttt{mrun} and if the same \texttt{mrun} 
406   call is submitted again, the second call will not replace the file
407   \texttt{example\_cbl\_rc}, but will create a new file with name:\\
408   \quad \texttt{\~{}/palm/current\_version/JOBS/example\_cbl/MONITORING/example\_cbl\_rc.1}\\
409   \ \\
410   \onslide<2->In case of netCDF-files, the file cycle number is inserted before
411   the netCDF-suffix .nc, e.g.\\
412   \quad \texttt{example\_cbl\_pr.1.nc}\\
413   \ \\
414   \onslide<3->The implemented file cycle mechanism does not allow to use
415   any other dots "'."'  in the path or filename:\\
416   \quad \texttt{\~{}/palm/version\_3.6/JOBS/example.sbl/MONITORING/example.sbl\_rc}
417\end{frame}
418
419% Folie 11
420\begin{frame}[fragile]
421   \frametitle{\normalsize File Connection Statements From the Default \texttt{.mrun.config} file}
422   \begin{columns}
423      \column{1.1\textwidth}
424      \tiny
425      \begin{lstlisting}
426#----------------------------------------------------------------------------
427# List of input-files
428#----------------------------------------------------------------------------
429PARIN                    in:job        d3#      $base_data/$fname/INPUT    _p3d
430PARIN                    in:job        d3f      $base_data/$fname/INPUT    _p3df
431TOPOGRAPHY_DATA          in:locopt     d3#:d3f  $base_data/$fname/INPUT    _topo
432BININ                    in:loc:flpe   d3f:rec  $base_data/$fname/RESTART  _d3d
433PARTICLE_RESTART_DATA_IN in:loc:flpe   prtf     $base_data/$fname/RESTART  _rprt
434DATA_1D_PR_NETCDF        in:locopt     prf      $base_data/$fname/OUTPUT   _pr     nc
435DATA_1D_SP_NETCDF        in:locopt     spf      $base_data/$fname/OUTPUT   _sp     nc
436DATA_1D_TS_NETCDF        in:locopt     tsf      $base_data/$fname/OUTPUT   _ts     nc
437DATA_1D_PTS_NETCDF       in:locopt     ptsf     $base_data/$fname/OUTPUT   _pts    nc
438DATA_2D_XY_NETCDF        in:locopt     xyf      $base_data/$fname/OUTPUT   _xy     nc
439DATA_2D_XY_AV_NETCDF     in:locopt     xyf      $base_data/$fname/OUTPUT   _xy_av  nc
440DATA_2D_XZ_NETCDF        in:locopt     xzf      $base_data/$fname/OUTPUT   _xz     nc
441DATA_2D_YZ_NETCDF        in:locopt     yzf      $base_data/$fname/OUTPUT   _yz     nc
442DATA_3D_NETCDF           in:locopt     3df      $base_data/$fname/OUTPUT   _3d     nc
443DATA_PRT_NETCDF          in:locopt:pe  prtf     $base_data/$fname/OUTPUT   _prt
444#
445#----------------------------------------------------------------------------
446# List of output-files
447#----------------------------------------------------------------------------
448BINOUT                    out:loc:flpe restart   $base_data/$fname/RESTART  _d3d
449PARTICLE_RESTART_DATA_OUT out:loc:flpe prt#:prtf $base_data/$fname/RESTART  _rprt
450#
451RUN_CONTROL       out:loc:tr   d3#     $base_data/$fname/MONITORING  _rc
452RUN_CONTROL       out:loc:tra  d3f     $base_data/$fname/MONITORING  _rc
453HEADER            out:loc:tr   d3#     $base_data/$fname/MONITORING  _header
454HEADER            out:loc:tra  d3f     $base_data/$fname/MONITORING  _header
455CPU_MEASURES      out:loc:tr   d3#     $base_data/$fname/MONITORING  _cpu
456CPU_MEASURES      out:loc:tra  d3f     $base_data/$fname/MONITORING  _cpu
457#
458DATA_1D_PR_NETCDF    out:loc:tr   pr#:prf   $base_data/$fname/OUTPUT  _pr     nc
459DATA_1D_SP_NETCDF    out:loc:tr   sp#:spf   $base_data/$fname/OUTPUT  _sp     nc
460DATA_1D_TS_NETCDF    out:loc:tr   ts#:tsf   $base_data/$fname/OUTPUT  _ts     nc
461DATA_1D_PTS_NETCDF   out:loc:tr   pts#:ptsf $base_data/$fname/OUTPUT  _pts    nc
462DATA_2D_XY_NETCDF    out:loc:tr   xy#:xyf   $base_data/$fname/OUTPUT  _xy     nc
463DATA_2D_XY_AV_NETCDF out:loc:tr   xy#:xyf   $base_data/$fname/OUTPUT  _xy_av  nc
464DATA_2D_XZ_NETCDF    out:loc:tr   xz#:xzf   $base_data/$fname/OUTPUT  _xz     nc
465DATA_2D_XZ_AV_NETCDF out:loc:tr   xz#:xzf   $base_data/$fname/OUTPUT  _xz_av  nc
466DATA_2D_YZ_NETCDF    out:loc:tr   yz#:yzf   $base_data/$fname/OUTPUT  _yz     nc
467DATA_2D_YZ_AV_NETCDF out:loc:tr   yz#:yzf   $base_data/$fname/OUTPUT  _yz_av  nc
468DATA_3D_NETCDF       out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d     nc
469DATA_3D_AV_NETCDF    out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d_av  nc
470DATA_PRT_NETCDF      out:loc:pe   prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
471DATA_PRT_NETCDF      out:loc:trpe prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
472DATA_DVR             out:loc:trpe dvr       $base_data/$fname/OUTPUT  _dvr
473#
474DVRP_LOG          out:loc:tr   dv#       $base_data/$fname/MONITORING  _dvrp_log
475DVRP_LOG          out:loc:tra  dvf       $base_data/$fname/MONITORING  _dvrp_log
476PARTICLE_INFO     out:loc:tr   pt#       $base_data/$fname/MONITORING  _prt_info
477PARTICLE_INFO     out:loc:tra  ptf       $base_data/$fname/MONITORING  _prt_info
478PARTICLE_DATA     out:loc:flpe prt#:prtf $base_data/$fname/OUTPUT      _prt_dat
479
480      \end{lstlisting}
481   \end{columns}
482\end{frame}
483
484% Folie 12
485\begin{frame}
486   \frametitle{Additional Features of \texttt{mrun}}
487   \begin{itemize}
488      \footnotesize
489      \item<1-> Generating batch jobs on local \textbf{and} remote host.
490      \item<2-> Setting of unix environment variables for job and model control (e.g. for determining compiler options, etc.).
491      \item<3-> Values have to be set in the \texttt{mrun} configuration file \texttt{.mrun.config}:
492   \end{itemize}
493   \onslide<4->\hspace{-1cm}\includegraphics[scale=0.3]{mrun_figures/add_feat1.png}
494   \begin{itemize}
495      \footnotesize
496      \item<5-> User-defined unix commands are carried out before or after execution of the model (input/output commands) or in case of errors during the compile- or run-step (error commands).
497      These commands can also be defined in the \texttt{mrun} configuration file:
498      \onslide<6-> \includegraphics[scale=0.3]{mrun_figures/add_feat2.png}
499      \item<7-> Automatic generation of restart jobs.
500   \end{itemize}
501\end{frame}
502
503% Folie 13
504\begin{frame}
505   \frametitle{PALM \textit{Interactive} Example Run Using \texttt{mrun}: Tracing the Run by the User}
506   \tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.45\textwidth, font=\scriptsize, minimum height=0.6cm]
507   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.42\textwidth, font=\scriptsize, minimum height=0.6cm]
508   \tikzstyle{yellow_big} = [rectangle, draw, fill=yellow!20, text width=0.45\textwidth, font=\scriptsize, minimum height=0.6cm]
509   \tikzstyle{notes} = [rectangle, text width=0.46\textwidth, font=\scriptsize, minimum height=0.6cm]
510   \tikzstyle{dummy} = [rectangle, text width=0.01\textwidth, font=\scriptsize, minimum height=0.6cm]
511   \vspace{-1.0cm}
512   \begin{center}
513           \begin{tikzpicture}[auto, node distance=0]
514         \uncover<1->{\node [yellow] (box1) {start run on local machine:\\
515                                            \texttt{mrun -d example\_cbl -h lcmuk ...}};}
516         \uncover<1->{\node [dummy, right=0.2cm of box1] (dummy1) {};}
517         \uncover<2->{\node [notes, above=0.2cm of dummy1] (notes1) {temporary working directory is created,\\all required files are copied there};}
518         \uncover<3->{\node [green, right=0.2cm of dummy1] (box2) {follow runs messages on terminal};}
519         \uncover<4->{\node [green, below=0.2cm of box2] (box3) {
520         as soon as message
521         
522         \texttt{*** execution starts in directory\\ \quad ''<tempdir>''}
523
524         you can change to this directory (in a new terminal) and watch the progess of timesteps
525
526         \texttt{cd <tempdir>}\\
527         \texttt{tail -f RUN\_CONTROL}
528
529         However, this might be difficult in case of short run times, because the run may have finished before you have entered the commands!
530         };}
531         \uncover<1->{\node [dummy, left=0.2cm of box3] (dummy2) {};}
532         \uncover<5->{\node [notes, below=1.7cm of dummy2] (notes2) {results are copied from temporary \\ working directory to the user‘s permanent directory};}
533         \uncover<6->{\node [yellow_big, left=0.2cm of dummy2] (box4) {
534         check, if the output files have sucessfully been transferred to the permanent directory:\\
535         \texttt{cd \~{}/palm/current\_version/JOBS/\\ \quad example\_cbl/MONITORING}\\
536         \texttt{ls -al}\\
537         \texttt{cd \~{}/palm/current\_version/JOBS/\\ \quad example\_cbl/OUTPUT}\\
538         \texttt{ls -al}
539};}
540         \draw<2-> [->] (box1.east) -- (box2.west);   
541         \draw<4-> [->] (box2.south) -- (box3.north);   
542         \draw<5-> [->] (box3.west) -- (box4.east);   
543           \end{tikzpicture}
544        \end{center}
545\end{frame}
546
547% Folie 14
548\begin{frame}
549   \frametitle{PALM \textit{Batch} Example Run (on HLRN, remote) Using \texttt{mrun}: Tracing the Run by the User}
550\tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.3\textwidth, font=\Tiny]
551\tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.4\textwidth, font=\Tiny]
552\tikzstyle{dummy} = [text width=0.2\textwidth, font=\Tiny]
553\tikzstyle{alert} = [rectangle, draw, text width=0.5\textwidth, font=\scriptsize]
554\tikzstyle{line} = [draw, -latex']
555\begin{itemize}
556   \item Reminder: Running batch jobs requires a directory \texttt{~/job\_queue} for the job protocol files on the local \underline{and} remote host.
557\end{itemize}
558\begin{tikzpicture}[auto, node distance=0]
559    \node [yellow] (first) {
560       \textbf{start job on local machine:}\\
561       \texttt{mrun -d example\_cbl -h lcsgih ...}
562    };
563\uncover<2->{
564    \node [dummy, right=0.5cm of first] (dummy) {
565       transfer of job by \texttt{scp} \\
566       \ \\
567       \ \\
568       submit of job by executing the \texttt{msub} command via \texttt{ssh}
569    };
570}
571\uncover<3->{
572    \node [green, right=3.5cm of first] (second) {
573       \textbf{follow job execution on remote host, by} \\
574       \texttt{showq} (better: \texttt{showq | grep hzkurs})
575    };
576}
577\uncover<4->{
578    \node [green, below=0.2cm of second] (third) {
579       \textbf{if job is running, you may follow its progress by watching the job protocol:} \\ 
580       \texttt{cd ~/job\_queue \\ tail lcmuk\_example\_cbl}
581    };
582}
583\uncover<5->{
584    \node [green, below=0.2cm of third] (fourth) {
585       \textbf{when job is running, change to directory \texttt{<tmp\_usr\_catalog>} and try to find there the latest directory \texttt{<HLRN-username>.<randomnumber>} \\ change to this directory and execute}\\
586       \texttt{tail -f RUN\_CONTROL}
587    };
588}
589\uncover<6->{
590    \node [green, below=0.2cm of fourth] (fifth) {
591       \textbf{when the job is finished, watch, if the job protocol is transferred to the local host without errors:}\\
592       \texttt{cd ~/job\_queue \\ cat last\_job\_transfer\_protocol}
593    };
594}
595\uncover<7->{
596    \node [dummy, left=0.5cm of fifth] (dummy) {
597       transfer results by \texttt{scp} \\
598       \ \\
599       \ \\
600    };
601}
602\uncover<8->{
603    \node [yellow, left=3.5cm of fifth] (sixth) {
604       \textbf{check, if the job protocol and all output files have successfully been transferred to the local machine:}\\
605       \texttt{cd ~/job\_queue \\ ls -al \\ cd ~/palm/current\_version/JOBS/example \\ ls -al *}
606    };
607}
608\uncover<9->{
609     \node [alert, below=0.5cm of first.south east] (alert) {
610        \textcolor{red}{Attention: Commands for submitting jobs and the behaviour of job protocol files are depending on the qeueuing system! Manual adjustments may be required in the mrun and subjob script!}
611     };
612}
613    \path<2-> [line] (first) -- (second);
614    \path<4-> [line] (second) -- (third);
615    \path<5-> [line] (third) -- (fourth);
616    \path<6-> [line] (fourth) -- (fifth);
617    \path<7-> [line] (fifth) -- (sixth);
618\end{tikzpicture}
619\end{frame}
620
621
622
623% Folie 15
624\begin{frame}
625   \tikzstyle{green} = [rectangle, draw, fill=green!20, text width=0.45\textwidth, font=\scriptsize, minimum height=0.6cm]
626   \tikzstyle{green_small} = [rectangle, draw, fill=green!20, text width=0.12\textwidth, font=\scriptsize, minimum height=0.6cm]
627   \tikzstyle{yellow_small} = [rectangle, draw, fill=yellow!20, text width=0.1\textwidth, font=\scriptsize, minimum height=0.6cm]
628   \tikzstyle{yellow} = [rectangle, draw, fill=yellow!20, text width=0.18\textwidth, font=\scriptsize, minimum height=0.6cm]
629   \tikzstyle{dummy} = [rectangle, text width=0.01\textwidth, font=\scriptsize, minimum height=0.6cm]
630   \tikzstyle{notes} = [rectangle, text width=0.15\textwidth, font=\scriptsize, minimum height=0.6cm]
631   
632   \frametitle{PALM Runs Using \texttt{mrun}: Further Details}
633   \begin{itemize}
634      \footnotesize
635      \item<2-> For every (initial) run, \texttt{mrun} creates a source directory which contains copies of
636      \begin{itemize}
637         \footnotesize
638         \item<4-> those source code files to be translated (always the main program, \texttt{palm.f90}, plus user interface files)
639         \item<4-> the Makefile
640         \item<5-> the configuration file
641         \item<6-> the mrun script
642      \end{itemize}
643   \end{itemize}
644   
645   \vspace{-0.8cm}
646   \begin{center}
647           \begin{tikzpicture}[auto, node distance=0]
648           
649         \uncover<3->{\node [yellow_small] (box1) {\$HOME/};}
650         \uncover<3->{\node [yellow_small, right=0.2cm of box1] (box2) {palm/};}
651         \uncover<3->{\node [yellow, right=0.2cm of box2] (box3) {current\_version/};}
652         \uncover<3->{\node [green_small, right=0.4cm of box3] (box4) {trunk/};}
653         
654         \uncover<1->{\node [dummy, right=1.0cm of box4] (dummy1) {};}
655         
656         \uncover<3->{\node [green_small, above=-0.2cm of dummy1] (box5) {SCRIPTS};}
657         \uncover<3->{\node [green_small, below=-0.2cm of dummy1] (box6) {SOURCE};}
658         
659         \uncover<6->{\node [notes, right=0.1cm of box5] (notes1) {\texttt{mrun}};}
660         \uncover<4->{\node [notes, right=0.1cm of box6] (notes2) {\texttt{Makefile \\ palm.f90}};}
661         \uncover<5->{\node [notes, below=0.1cm of box3] (notes3) {\texttt{.mrun.config}};}
662         
663         \uncover<3->{\node [green, below=0.2cm of box6] (box7) {SOURCES\_FOR\_RUN\_$<$run\_identifier$>$};}
664         
665         \uncover<1->{\node [dummy, left=1.5cm of box7] (dummy2) {};}
666         \uncover<1->{\node [dummy, right=2.0cm of box5] (dummy3) {};}
667         \uncover<1->{\node [dummy, right=1.8cm of box6] (dummy4) {};}
668         \uncover<1->{\node [dummy, below=0.2cm of dummy4] (dummy5) {};}
669         \draw<3-> [-] (box1.east) -- (box2.west); 
670         \draw<3-> [-] (box2.east) -- (box3.west); 
671         \draw<3-> [-] (box3.east) -- (box4.west); 
672         \draw<3-> [-] (box4.east) -- (box5.west); 
673         \draw<3-> [-] (box4.east) -- (box6.west);     
674         \draw<3-> [-] (box3.east) -- (box7.west);   
675         \draw<6-> [-] ([xshift=-0.8cm]notes1.east) -- (dummy3.center);   
676         \draw<4-> [-] ([xshift=-0.4cm]notes2.east) -- (dummy4.center);
677         \draw<4-> [-] (dummy4.center) -- ([yshift=0.1cm]dummy5.center);
678         \draw<4-> [->] ([yshift=0.1cm]dummy5.center) -- ([yshift=0.1cm]box7.east);
679         \draw<6-> [-] (dummy3.center) -- ([xshift=0.2cm, yshift=-0.1cm]dummy5.center);
680         \draw<6-> [->] ([xshift=0.2cm, yshift=-0.1cm]dummy5.center) -- ([yshift=-0.1cm]box7.east);
681         \draw<5-> [-] ([yshift=0.3cm]dummy2.center) -- (dummy2.center);   
682         \draw<5-> [->] (dummy2.center) -- (box7.west);   
683           \end{tikzpicture}
684        \end{center}
685   
686   \begin{itemize}
687      \footnotesize
688      \item<7-> These files are used in the run/job. They are also used by restart jobs, which guarantees, that all jobs in a job chain are using the same information. Please never modify these directories, unless you exactly know, what you are doing.
689   \end{itemize}
690\end{frame}
691
692\end{document}
Note: See TracBrowser for help on using the repository browser.