| 1 |
jmc |
1.6 |
% $Header: /u/gcmpack/manual/s_getstarted/text/testing.tex,v 1.5 2010/05/28 21:06:01 jmc Exp $ |
| 2 |
edhill |
1.1 |
% $Name: $ |
| 3 |
|
|
|
| 4 |
|
|
\section{Testing} |
| 5 |
jmc |
1.6 |
\label{sec:testing} |
| 6 |
edhill |
1.1 |
\label{www:testing} |
| 7 |
edhill |
1.3 |
\begin{rawhtml} |
| 8 |
|
|
<!-- CMIREDIR:testing: --> |
| 9 |
|
|
\end{rawhtml} |
| 10 |
edhill |
1.1 |
|
| 11 |
|
|
A script (\texttt{testreport}) for automated testing is included in |
| 12 |
|
|
the model within the {\em verification} directory. While intended |
| 13 |
edhill |
1.2 |
mostly for advanced users, the script can be helpful for beginners. |
| 14 |
edhill |
1.1 |
|
| 15 |
|
|
\subsection{Using \texttt{testreport}} |
| 16 |
|
|
|
| 17 |
edhill |
1.2 |
On many systems, the program can be run with the command: |
| 18 |
edhill |
1.1 |
\begin{verbatim} |
| 19 |
|
|
% cd verification |
| 20 |
jmc |
1.4 |
% ./testreport |
| 21 |
edhill |
1.1 |
\end{verbatim} |
| 22 |
|
|
which will do the following: |
| 23 |
|
|
\begin{enumerate} |
| 24 |
edhill |
1.2 |
\item Locate all ``valid'' test directories. Here, valid tests are |
| 25 |
|
|
defined to be those directories within the current directory (which |
| 26 |
|
|
is generally {\em verification}) that contain a subdirectory and |
| 27 |
|
|
file with the names {\em results/output.txt}. |
| 28 |
|
|
|
| 29 |
|
|
\item Then within each valid test: |
| 30 |
|
|
\begin{enumerate} |
| 31 |
|
|
\item run \texttt{genmake2} to produce a {\em Makefile} |
| 32 |
|
|
\item build an executable |
| 33 |
|
|
\item run the executable |
| 34 |
|
|
\item compare and the output of the executable with the |
| 35 |
|
|
contents of certain variables within {\em |
| 36 |
|
|
TESTNAME/results/output.txt} |
| 37 |
|
|
\item print and, if requested (with the |
| 38 |
|
|
\texttt{-addr=EMAIL\_ADDRESS} option), send a MIME-encoded email |
| 39 |
|
|
with the testing results |
| 40 |
|
|
\end{enumerate} |
| 41 |
|
|
|
| 42 |
edhill |
1.1 |
\end{enumerate} |
| 43 |
|
|
|
| 44 |
edhill |
1.2 |
For further details, please see the MITgcm Developers' HOWTO at: |
| 45 |
jmc |
1.5 |
\begin{rawhtml} <A href="http://mitgcm.org/public/docs.html" target="idontexist"> \end{rawhtml} |
| 46 |
edhill |
1.2 |
\begin{verbatim} |
| 47 |
jmc |
1.4 |
http://mitgcm.org/public/docs.html |
| 48 |
edhill |
1.2 |
\end{verbatim} |
| 49 |
|
|
\begin{rawhtml} </A> \end{rawhtml} |
| 50 |
edhill |
1.1 |
|
| 51 |
|
|
|
| 52 |
|
|
\subsection{Automated testing} |
| 53 |
edhill |
1.2 |
|
| 54 |
|
|
Automated testing results are produced on a regular basis and they can |
| 55 |
|
|
be viewed at: |
| 56 |
jmc |
1.5 |
\begin{rawhtml} <A href="http://mitgcm.org/public/testing.html" target="idontexist"> \end{rawhtml} |
| 57 |
edhill |
1.2 |
\begin{verbatim} |
| 58 |
jmc |
1.4 |
http://mitgcm.org/public/testing.html |
| 59 |
edhill |
1.2 |
\end{verbatim} |
| 60 |
|
|
\begin{rawhtml} </A> \end{rawhtml} |
| 61 |
|
|
which also includes links to various scripts for batch job submission |
| 62 |
|
|
on a variety of different machines. |
| 63 |
edhill |
1.1 |
|