Changeset 3164
- Timestamp:
- Jun 15, 2006, 5:31:57 PM (18 years ago)
- Location:
- inundation/parallel/documentation
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/parallel/documentation/code.tex
r2786 r3164 1 1 2 2 \chapter{Code Listing}\label{chap:code} 3 \section{run_parallel_advection.py}\label{sec:codeRPA} 3 \section{Python Programs}\label{sec:codePP} 4 \subsection{run_parallel_advection.py}\label{subsec:codeRPA} 4 5 \verbatiminput{code/RunParallelAdvection.py} 5 6 \newpage 6 \s ection{run_parallel_merimbula_metis.py}\label{sec:codeRPMM}7 \subsection{run_parallel_merimbula_metis.py}\label{subsec:codeRPMM} 7 8 \verbatiminput{code/RunParallelMerimbulaMetis.py} 8 9 \newpage 9 \s ection{run_parallel_sw_merimbula_metis.py}\label{sec:codeRPSMM}10 \subsection{run_parallel_sw_merimbula_metis.py}\label{subsec:codeRPSMM} 10 11 \verbatiminput{code/RunParallelSwMerimbulaMetis.py} 12 \newpage 13 \section{Sample Jobscripts}\label{sec:codeSJ} 14 \subsection{4 Processor run_parallel_sw_merimbula_metis.py (APAC Linux Cluster)}\label{subsec:code4RPSMMAPAC} 15 The APAC cluster charges computing time spent on jobs to project 16 accounts. This creates extra directives at the start of the 17 jobscript. Further, there is a bug in the environment module system used on 18 this cluster. For jobs to run correctly, there must be no ``module load'' 19 statements in the files .bashrc, .cshrc, .profile or .login. 20 \verbatiminput{code/pbs-run-parallel-merimbula-metis-4-apac} 21 \newpage 22 \subsection{4 Processor run_parallel_sw_merimbula_metis.py (``Bogong'' Linux Cluster)}\label{subsec:code4RPSMMBogong} 23 \verbatiminput{code/pbs-run-parallel-merimbula-metis-4-bogong} -
inundation/parallel/documentation/parallel.tex
r2911 r3164 143 143 Chapter \ref{chap:code} gives full listings of some example codes. 144 144 145 The first example in Section \ref{s ec:codeRPA} solves the advection equation on a145 The first example in Section \ref{subsec:codeRPA} solves the advection equation on a 146 146 rectangular mesh. A rectangular mesh is highly structured so a coordinate based decomposition can be use and the partitioning is simply done by calling the 147 147 routine \code{parallel_rectangle} as shown below. … … 161 161 162 162 163 A more \lq real life\rq\ mesh is the Merimbula mesh used in the code shown in Section \ref{s ec:codeRPMM}. This example also solves the advection equation. In this case the techniques described in Section \ref{sec:part} must be used to partition the mesh. Figure \ref{fig:code} shows the part of the code that is responsible for spreading the mesh over the processors. We now look at the code in detail.163 A more \lq real life\rq\ mesh is the Merimbula mesh used in the code shown in Section \ref{subsec:codeRPMM}. This example also solves the advection equation. In this case the techniques described in Section \ref{sec:part} must be used to partition the mesh. Figure \ref{fig:code} shows the part of the code that is responsible for spreading the mesh over the processors. We now look at the code in detail. 164 164 165 165 \begin{figure}[htbp] … … 203 203 rec_submesh(0) 204 204 \end{verbatim} 205 \caption{A section of code taken from {\tt run_parallel_merimbula_metis.py} (Section \protect \ref{s ec:codeRPMM}) showing how to subdivide the mesh.}205 \caption{A section of code taken from {\tt run_parallel_merimbula_metis.py} (Section \protect \ref{subsec:codeRPMM}) showing how to subdivide the mesh.} 206 206 \label{fig:code} 207 207 \end{figure} … … 209 209 \begin{itemize} 210 210 \item 211 These first few lines of code read in and define the (global) mesh. The \code{Set_Stage} function sets the initial conditions. See the code in \ref{s ec:codeRPMM} for the definition of \code{Set_Stage}.211 These first few lines of code read in and define the (global) mesh. The \code{Set_Stage} function sets the initial conditions. See the code in \ref{subsec:codeRPMM} for the definition of \code{Set_Stage}. 212 212 \begin{verbatim} 213 213 filename = 'merimbula_10785.tsh' … … 252 252 \section{Running the Code} 253 253 \subsection{Compiling Pymetis and Metis} 254 Building the Pymetis wrapper is done using Make, but there are variations 255 depening on the host system type. Under most types of Linux, simply running 256 \verb|make| will work. Under x86\_64 versions of Linux, the command is 257 \verb|make COPTIONS="-fPIC"|. Finally, under windows, the command is 258 \verb|make for_win32|. For a sanity check, a simple PyUnit test is provided, 259 called test\_metis.py . A metis 4.0 source tree is expected to exist in the 260 metis-4.0 subdirectory and is automatically built by the makefile. 254 Currently, Metis and its Python wrapper Pymetis are not built by the 255 \verb|compile_all.py| script. A makefile is provided to automate the build 256 process. Change directory to the \verb|ga/inundation/pymetis/| directory and 257 ensure that the subdirectory \verb|metis-4.0| exists and contains an 258 unmodified Metis 4.0 source tree. Under most varieties of Linux, build the 259 module by running \verb|make|. Under x86\_64 versions of Linux, build the 260 module by running \verb|make COPTIONS="-fPIC"|. Under Windows, build the 261 module by running \verb|make for_win32|. After the build completes, verify 262 that the module works by running the supplied PyUnit test case with 263 \verb|python test_metis.py|.
Note: See TracChangeset
for help on using the changeset viewer.