Changeset 3164


Ignore:
Timestamp:
Jun 15, 2006, 5:31:57 PM (18 years ago)
Author:
jack
Message:

Added code samples for batch scripts. Need to update results.tex to make it less confusing

Location:
inundation/parallel/documentation
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/parallel/documentation/code.tex

    r2786 r3164  
    11
    22\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}
    45\verbatiminput{code/RunParallelAdvection.py}
    56\newpage
    6 \section{run_parallel_merimbula_metis.py}\label{sec:codeRPMM}
     7\subsection{run_parallel_merimbula_metis.py}\label{subsec:codeRPMM}
    78\verbatiminput{code/RunParallelMerimbulaMetis.py}
    89\newpage
    9 \section{run_parallel_sw_merimbula_metis.py}\label{sec:codeRPSMM}
     10\subsection{run_parallel_sw_merimbula_metis.py}\label{subsec:codeRPSMM}
    1011\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}
     15The APAC cluster charges computing time spent on jobs to project
     16accounts. This creates extra directives at the start of the
     17jobscript. Further, there is a bug in the environment module system used on
     18this cluster. For jobs to run correctly, there must be no ``module load''
     19statements 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  
    143143Chapter \ref{chap:code} gives full listings of some example codes.
    144144
    145 The first example in Section \ref{sec:codeRPA} solves the advection equation on a
     145The first example in Section \ref{subsec:codeRPA} solves the advection equation on a
    146146rectangular mesh. A rectangular mesh is highly structured so a coordinate based decomposition can be use and the partitioning is simply done by calling the
    147147routine \code{parallel_rectangle} as shown below.
     
    161161
    162162
    163 A more \lq real life\rq\ mesh is the Merimbula mesh used in the code shown in Section \ref{sec: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.
     163A 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.
    164164
    165165\begin{figure}[htbp]
     
    203203             rec_submesh(0)
    204204\end{verbatim}
    205   \caption{A section of code taken from {\tt run_parallel_merimbula_metis.py} (Section \protect \ref{sec: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.}
    206206 \label{fig:code}
    207207\end{figure}
     
    209209\begin{itemize}
    210210\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{sec:codeRPMM} for the definition of \code{Set_Stage}.
     211These 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}.
    212212\begin{verbatim}
    213213    filename = 'merimbula_10785.tsh'
     
    252252\section{Running the Code}
    253253\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.
     254Currently, 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
     256process. Change directory to the \verb|ga/inundation/pymetis/| directory and
     257ensure that the subdirectory \verb|metis-4.0| exists and contains an
     258unmodified Metis 4.0 source tree. Under most varieties of Linux, build the
     259module by running \verb|make|. Under x86\_64 versions of Linux, build the
     260module by running \verb|make COPTIONS="-fPIC"|. Under Windows, build the
     261module by running \verb|make for_win32|. After the build completes, verify
     262that 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.