| 666 |
\end{verbatim} |
\end{verbatim} |
| 667 |
|
|
| 668 |
|
|
| 669 |
\subsection{Using \textit{genmake2}} |
\subsection{Using \texttt{genmake2}} |
| 670 |
\label{sect:genmake} |
\label{sect:genmake} |
| 671 |
|
|
| 672 |
To compile the code, first use the program \texttt{genmake2} (located |
To compile the code, first use the program \texttt{genmake2} (located |
| 673 |
in the \textit{tools} directory) to generate a Makefile. |
in the \texttt{tools} directory) to generate a Makefile. |
| 674 |
\texttt{genmake2} is a shell script written to work with all |
\texttt{genmake2} is a shell script written to work with all |
| 675 |
``sh''--compatible shells including bash v1, bash v2, and Bourne. |
``sh''--compatible shells including bash v1, bash v2, and Bourne. |
| 676 |
Internally, \texttt{genmake2} determines the locations of needed |
Internally, \texttt{genmake2} determines the locations of needed |
| 677 |
files, the compiler, compiler options, libraries, and Unix tools. It |
files, the compiler, compiler options, libraries, and Unix tools. It |
| 678 |
relies upon a number of ``optfiles'' located in the {\em |
relies upon a number of ``optfiles'' located in the |
| 679 |
tools/build\_options} directory. |
\texttt{tools/build\_options} directory. |
| 680 |
|
|
| 681 |
The purpose of the optfiles is to provide all the compilation options |
The purpose of the optfiles is to provide all the compilation options |
| 682 |
for particular ``platforms'' (where ``platform'' roughly means the |
for particular ``platforms'' (where ``platform'' roughly means the |
| 918 |
Sightly more complicated scripts may be needed for many machines |
Sightly more complicated scripts may be needed for many machines |
| 919 |
since execution of the code may be controlled by both the MPI |
since execution of the code may be controlled by both the MPI |
| 920 |
library and a job scheduling and queueing system such as PBS, |
library and a job scheduling and queueing system such as PBS, |
| 921 |
LoadLeveller, Condor, or any of a number of similar tools. |
LoadLeveller, Condor, or any of a number of similar tools. A few |
| 922 |
|
example scripts (those used for our \begin{rawhtml} <A |
| 923 |
|
href="http://mitgcm.org/testing.html"> \end{rawhtml}regular |
| 924 |
|
verification runs\begin{rawhtml} </A> \end{rawhtml}) are available |
| 925 |
|
at: |
| 926 |
|
\begin{rawhtml} <A |
| 927 |
|
href="http://mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm_contrib/test_scripts/"> |
| 928 |
|
\end{rawhtml} |
| 929 |
|
{\footnotesize \tt |
| 930 |
|
http://mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm\_contrib/test\_scripts/ } |
| 931 |
|
\begin{rawhtml} </A> \end{rawhtml} |
| 932 |
|
|
| 933 |
\end{enumerate} |
\end{enumerate} |
| 934 |
|
|
| 935 |
|
An example of the above process on the MITgcm cluster (``cg01'') using |
| 936 |
|
the GNU g77 compiler and the mpich MPI library is: |
| 937 |
|
|
| 938 |
|
{\footnotesize \begin{verbatim} |
| 939 |
|
% cd MITgcm/verification/exp5 |
| 940 |
|
% mkdir build |
| 941 |
|
% cd build |
| 942 |
|
% ../../../tools/genmake2 -mpi -mods=../code \ |
| 943 |
|
-of=../../../tools/build_options/linux_ia32_g77+mpi_cg01 |
| 944 |
|
% make depend |
| 945 |
|
% make |
| 946 |
|
% cd ../input |
| 947 |
|
% /usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/g77/bin/mpirun.ch_gm \ |
| 948 |
|
-machinefile mf --gm-kill 5 -v -np 2 ../build/mitgcmuv |
| 949 |
|
\end{verbatim} } |
| 950 |
|
|
| 951 |
|
|
| 952 |
|
|
| 953 |
\section{Running the model} |
\section{Running the model} |