39 |
\begin{rawhtml} </A> \end{rawhtml} |
\begin{rawhtml} </A> \end{rawhtml} |
40 |
Essentially all of the MITgcm web pages can be searched using a |
Essentially all of the MITgcm web pages can be searched using a |
41 |
popular web crawler such as Google or through our own search facility: |
popular web crawler such as Google or through our own search facility: |
42 |
|
\begin{rawhtml} <A href=http://mitgcm.org/mailman/htdig/ target="idontexist"> \end{rawhtml} |
43 |
\begin{verbatim} |
\begin{verbatim} |
44 |
http://mitgcm.org/htdig/ |
http://mitgcm.org/htdig/ |
45 |
\end{verbatim} |
\end{verbatim} |
109 |
\end{verbatim} |
\end{verbatim} |
110 |
or to get a specific release type: |
or to get a specific release type: |
111 |
\begin{verbatim} |
\begin{verbatim} |
112 |
% cvs co -d directory -P -r release1_beta1 MITgcm |
% cvs co -P -r checkpoint52i_post MITgcm |
113 |
\end{verbatim} |
\end{verbatim} |
114 |
The MITgcm web site contains further directions concerning the source |
The MITgcm web site contains further directions concerning the source |
115 |
code and CVS. It also contains a web interface to our CVS archive so |
code and CVS. It also contains a web interface to our CVS archive so |
117 |
development milestones: |
development milestones: |
118 |
\begin{rawhtml} <A href=http://mitgcm.org/download target="idontexist"> \end{rawhtml} |
\begin{rawhtml} <A href=http://mitgcm.org/download target="idontexist"> \end{rawhtml} |
119 |
\begin{verbatim} |
\begin{verbatim} |
120 |
http://mitgcm.org/source_code.html |
http://mitgcm.org/source\_code.html |
121 |
\end{verbatim} |
\end{verbatim} |
122 |
\begin{rawhtml} </A> \end{rawhtml} |
\begin{rawhtml} </A> \end{rawhtml} |
123 |
|
|
162 |
\end{verbatim} |
\end{verbatim} |
163 |
and then issue the cvs update command such as: |
and then issue the cvs update command such as: |
164 |
\begin{verbatim} |
\begin{verbatim} |
165 |
% cvs -q update -r release1_beta1 -d -P |
% cvs -q update -r checkpoint52i_post -d -P |
166 |
\end{verbatim} |
\end{verbatim} |
167 |
This will update the ``tag'' to ``release1\_beta1'', add any new |
This will update the ``tag'' to ``checkpoint52i\_post'', add any new |
168 |
directories (-d) and remove any empty directories (-P). The -q option |
directories (-d) and remove any empty directories (-P). The -q option |
169 |
means be quiet which will reduce the number of messages you'll see in |
means be quiet which will reduce the number of messages you'll see in |
170 |
the terminal. If you have modified the code prior to upgrading, CVS |
the terminal. If you have modified the code prior to upgrading, CVS |
384 |
|
|
385 |
\begin{itemize} |
\begin{itemize} |
386 |
\item \textit{code}: contains the code particular to the example. At a |
\item \textit{code}: contains the code particular to the example. At a |
387 |
minimum, this directory includes the following files: |
minimum, this directory includes the following files: |
388 |
|
|
389 |
\begin{itemize} |
\begin{itemize} |
390 |
\item \textit{code/CPP\_EEOPTIONS.h}: declares CPP keys relative to |
\item \textit{code/CPP\_EEOPTIONS.h}: declares CPP keys relative to |
391 |
the ``execution environment'' part of the code. The default version |
the ``execution environment'' part of the code. The default |
392 |
is located in \textit{eesupp/inc}. |
version is located in \textit{eesupp/inc}. |
393 |
|
|
394 |
\item \textit{code/CPP\_OPTIONS.h}: declares CPP keys relative to the |
\item \textit{code/CPP\_OPTIONS.h}: declares CPP keys relative to |
395 |
``numerical model'' part of the code. The default version is located |
the ``numerical model'' part of the code. The default version is |
396 |
in \textit{model/inc}. |
located in \textit{model/inc}. |
397 |
|
|
398 |
|
\item \textit{code/SIZE.h}: declares size of underlying |
399 |
|
computational grid. The default version is located in |
400 |
|
\textit{model/inc}. |
401 |
|
\end{itemize} |
402 |
|
|
403 |
|
In addition, other include files and subroutines might be present in |
404 |
|
\textit{code} depending on the particular experiment. See Section 2 |
405 |
|
for more details. |
406 |
|
|
|
\item \textit{code/SIZE.h}: declares size of underlying computational |
|
|
grid. The default version is located in \textit{model/inc}. |
|
|
\end{itemize} |
|
|
|
|
|
In addition, other include files and subroutines might be present in |
|
|
\textit{code} depending on the particular experiment. See Section 2 |
|
|
for more details. |
|
|
|
|
407 |
\item \textit{input}: contains the input data files required to run |
\item \textit{input}: contains the input data files required to run |
408 |
the example. At a minimum, the \textit{input} directory contains the |
the example. At a minimum, the \textit{input} directory contains the |
409 |
following files: |
following files: |
410 |
|
|
411 |
\begin{itemize} |
\begin{itemize} |
412 |
\item \textit{input/data}: this file, written as a namelist, specifies |
\item \textit{input/data}: this file, written as a namelist, |
413 |
the main parameters for the experiment. |
specifies the main parameters for the experiment. |
414 |
|
|
415 |
\item \textit{input/data.pkg}: contains parameters relative to the |
\item \textit{input/data.pkg}: contains parameters relative to the |
416 |
packages used in the experiment. |
packages used in the experiment. |
417 |
|
|
418 |
\item \textit{input/eedata}: this file contains ``execution |
\item \textit{input/eedata}: this file contains ``execution |
419 |
environment'' data. At present, this consists of a specification of |
environment'' data. At present, this consists of a specification |
420 |
the number of threads to use in $X$ and $Y$ under multithreaded |
of the number of threads to use in $X$ and $Y$ under multithreaded |
421 |
execution. |
execution. |
422 |
\end{itemize} |
\end{itemize} |
423 |
|
|
424 |
In addition, you will also find in this directory the forcing and topography |
In addition, you will also find in this directory the forcing and |
425 |
files as well as the files describing the initial state of the experiment. |
topography files as well as the files describing the initial state of |
426 |
This varies from experiment to experiment. See section 2 for more details. |
the experiment. This varies from experiment to experiment. See |
427 |
|
section 2 for more details. |
428 |
\item \textit{results}: this directory contains the output file \textit{% |
|
429 |
output.txt} produced by the simulation example. This file is useful for |
\item \textit{results}: this directory contains the output file |
430 |
comparison with your own output when you run the experiment. |
\textit{output.txt} produced by the simulation example. This file is |
431 |
|
useful for comparison with your own output when you run the |
432 |
|
experiment. |
433 |
\end{itemize} |
\end{itemize} |
434 |
|
|
435 |
Once you have chosen the example you want to run, you are ready to compile |
Once you have chosen the example you want to run, you are ready to compile |
441 |
To compile the code, we use the {\em make} program. This uses a file |
To compile the code, we use the {\em make} program. This uses a file |
442 |
({\em Makefile}) that allows us to pre-process source files, specify |
({\em Makefile}) that allows us to pre-process source files, specify |
443 |
compiler and optimization options and also figures out any file |
compiler and optimization options and also figures out any file |
444 |
dependencies. We supply a script ({\em genmake}), described in section |
dependencies. We supply a script ({\em genmake2}), described in |
445 |
\ref{sect:genmake}, that automatically creates the {\em Makefile} for |
section \ref{sect:genmake}, that automatically creates the {\em |
446 |
you. You then need to build the dependencies and compile the code. |
Makefile} for you. You then need to build the dependencies and |
447 |
|
compile the code. |
448 |
|
|
449 |
As an example, let's assume that you want to build and run experiment |
As an example, let's assume that you want to build and run experiment |
450 |
\textit{verification/exp2}. The are multiple ways and places to actually |
\textit{verification/exp2}. The are multiple ways and places to |
451 |
do this but here let's build the code in |
actually do this but here let's build the code in |
452 |
\textit{verification/exp2/input}: |
\textit{verification/exp2/input}: |
453 |
\begin{verbatim} |
\begin{verbatim} |
454 |
% cd verification/exp2/input |
% cd verification/exp2/input |
455 |
\end{verbatim} |
\end{verbatim} |
456 |
First, build the {\em Makefile}: |
First, build the {\em Makefile}: |
457 |
\begin{verbatim} |
\begin{verbatim} |
458 |
% ../../../tools/genmake -mods=../code |
% ../../../tools/genmake2 -mods=../code |
459 |
\end{verbatim} |
\end{verbatim} |
460 |
The command line option tells {\em genmake} to override model source |
The command line option tells {\em genmake} to override model source |
461 |
code with any files in the directory {\em ./code/}. |
code with any files in the directory {\em ./code/}. |
462 |
|
|
463 |
If there is no \textit{.genmakerc} in the \textit{input} directory, you have |
On many systems, the {\em genmake2} program will be able to |
464 |
to use the following options when invoking \textit{genmake}: |
automatically recognize the hardware, find compilers and other tools |
465 |
|
within the user's path (``echo \$PATH''), and then choose an |
466 |
|
appropriate set of options from the files contained in the {\em |
467 |
|
tools/build\_options} directory. Under some circumstances, a user |
468 |
|
may have to create a new ``optfile'' in order to specify the exact |
469 |
|
combination of compiler, compiler flags, libraries, and other options |
470 |
|
necessary to build a particular configuration of MITgcm. In such |
471 |
|
cases, it is generally helpful to read the existing ``optfiles'' and |
472 |
|
mimic their syntax. |
473 |
|
|
474 |
|
Through the MITgcm-support list, the MITgcm developers are willing to |
475 |
|
provide help writing or modifing ``optfiles''. And we encourage users |
476 |
|
to post new ``optfiles'' (particularly ones for new machines or |
477 |
|
architectures) to the MITgcm-support list. |
478 |
|
|
479 |
|
To specify an optfile to {\em genmake2}, the syntax is: |
480 |
\begin{verbatim} |
\begin{verbatim} |
481 |
% ../../../tools/genmake -mods=../code |
% ../../../tools/genmake2 -mods=../code -of /path/to/optfile |
482 |
\end{verbatim} |
\end{verbatim} |
483 |
|
|
484 |
Next, create the dependencies: |
Once a {\em Makefile} has been generated, we create the dependencies: |
485 |
\begin{verbatim} |
\begin{verbatim} |
486 |
% make depend |
% make depend |
487 |
\end{verbatim} |
\end{verbatim} |
488 |
This modifies {\em Makefile} by attaching a [long] list of files on |
This modifies the {\em Makefile} by attaching a [long] list of files |
489 |
which other files depend. The purpose of this is to reduce |
upon which other files depend. The purpose of this is to reduce |
490 |
re-compilation if and when you start to modify the code. {\tt make |
re-compilation if and when you start to modify the code. The {\tt make |
491 |
depend} also created links from the model source to this directory. |
depend} command also creates links from the model source to this |
492 |
|
directory. |
493 |
|
|
494 |
Now compile the code: |
Next compile the code: |
495 |
\begin{verbatim} |
\begin{verbatim} |
496 |
% make |
% make |
497 |
\end{verbatim} |
\end{verbatim} |
498 |
The {\tt make} command creates an executable called \textit{mitgcmuv}. |
The {\tt make} command creates an executable called \textit{mitgcmuv}. |
499 |
|
Additional make ``targets'' are defined within the makefile to aid in |
500 |
|
the production of adjoint and other versions of MITgcm. |
501 |
|
|
502 |
Now you are ready to run the model. General instructions for doing so are |
Now you are ready to run the model. General instructions for doing so are |
503 |
given in section \ref{sect:runModel}. Here, we can run the model with: |
given in section \ref{sect:runModel}. Here, we can run the model with: |
515 |
convenience. You can also configure and compile the code in other |
convenience. You can also configure and compile the code in other |
516 |
locations, for example on a scratch disk with out having to copy the |
locations, for example on a scratch disk with out having to copy the |
517 |
entire source tree. The only requirement to do so is you have {\tt |
entire source tree. The only requirement to do so is you have {\tt |
518 |
genmake} in your path or you know the absolute path to {\tt genmake}. |
genmake2} in your path or you know the absolute path to {\tt |
519 |
|
genmake2}. |
520 |
|
|
521 |
The following sections outline some possible methods of organizing you |
The following sections outline some possible methods of organizing |
522 |
source and data. |
your source and data. |
523 |
|
|
524 |
\subsubsection{Building from the {\em ../code directory}} |
\subsubsection{Building from the {\em ../code directory}} |
525 |
|
|
526 |
This is just as simple as building in the {\em input/} directory: |
This is just as simple as building in the {\em input/} directory: |
527 |
\begin{verbatim} |
\begin{verbatim} |
528 |
% cd verification/exp2/code |
% cd verification/exp2/code |
529 |
% ../../../tools/genmake |
% ../../../tools/genmake2 |
530 |
% make depend |
% make depend |
531 |
% make |
% make |
532 |
\end{verbatim} |
\end{verbatim} |
555 |
% cd verification/exp2 |
% cd verification/exp2 |
556 |
% mkdir build |
% mkdir build |
557 |
% cd build |
% cd build |
558 |
% ../../../tools/genmake -mods=../code |
% ../../../tools/genmake2 -mods=../code |
559 |
% make depend |
% make depend |
560 |
% make |
% make |
561 |
\end{verbatim} |
\end{verbatim} |
577 |
% ./mitgcmuv > output.txt |
% ./mitgcmuv > output.txt |
578 |
\end{verbatim} |
\end{verbatim} |
579 |
|
|
580 |
\subsubsection{Building from on a scratch disk} |
\subsubsection{Building on a scratch disk} |
581 |
|
|
582 |
Model object files and output data can use up large amounts of disk |
Model object files and output data can use up large amounts of disk |
583 |
space so it is often the case that you will be operating on a large |
space so it is often the case that you will be operating on a large |
585 |
following commands will build the model in {\em /scratch/exp2-run1}: |
following commands will build the model in {\em /scratch/exp2-run1}: |
586 |
\begin{verbatim} |
\begin{verbatim} |
587 |
% cd /scratch/exp2-run1 |
% cd /scratch/exp2-run1 |
588 |
% ~/MITgcm/tools/genmake -rootdir=~/MITgcm -mods=~/MITgcm/verification/exp2/code |
% ~/MITgcm/tools/genmake2 -rootdir=~/MITgcm \ |
589 |
|
-mods=~/MITgcm/verification/exp2/code |
590 |
% make depend |
% make depend |
591 |
% make |
% make |
592 |
\end{verbatim} |
\end{verbatim} |
602 |
% cd /scratch/exp2 |
% cd /scratch/exp2 |
603 |
% mkdir build |
% mkdir build |
604 |
% cd build |
% cd build |
605 |
% ~/MITgcm/tools/genmake -rootdir=~/MITgcm -mods=~/MITgcm/verification/exp2/code |
% ~/MITgcm/tools/genmake2 -rootdir=~/MITgcm \ |
606 |
|
-mods=~/MITgcm/verification/exp2/code |
607 |
% make depend |
% make depend |
608 |
% make |
% make |
609 |
% cd ../ |
% cd ../ |
614 |
|
|
615 |
|
|
616 |
|
|
617 |
\subsection{\textit{genmake}} |
\subsection{Using \textit{genmake2}} |
618 |
\label{sect:genmake} |
\label{sect:genmake} |
619 |
|
|
620 |
To compile the code, use the script \textit{genmake} located in the \textit{% |
To compile the code, first use the program \texttt{genmake2} (located |
621 |
tools} directory. \textit{genmake} is a script that generates the makefile. |
in the \textit{tools} directory) to generate a Makefile. |
622 |
It has been written so that the code can be compiled on a wide diversity of |
\texttt{genmake2} is a shell script written to work with all |
623 |
machines and systems. However, if it doesn't work the first time on your |
``sh''--compatible shells including bash v1, bash v2, and Bourne. |
624 |
platform, you might need to edit certain lines of \textit{genmake} in the |
Internally, \texttt{genmake2} determines the locations of needed |
625 |
section containing the setups for the different machines. The file is |
files, the compiler, compiler options, libraries, and Unix tools. It |
626 |
structured like this: |
relies upon a number of ``optfiles'' located in the {\em |
627 |
\begin{verbatim} |
tools/build\_options} directory. |
628 |
. |
|
629 |
. |
The purpose of the optfiles is to provide all the compilation options |
630 |
. |
for particular ``platforms'' (where ``platform'' roughly means the |
631 |
general instructions (machine independent) |
combination of the hardware and the compiler) and code configurations. |
632 |
. |
Given the combinations of possible compilers and library dependencies |
633 |
. |
({\it eg.} MPI and NetCDF) there may be numerous optfiles available |
634 |
. |
for a single machine. The naming scheme for the majority of the |
635 |
- setup machine 1 |
optfiles shipped with the code is |
636 |
- setup machine 2 |
\begin{center} |
637 |
- setup machine 3 |
{\bf OS\_HARDWARE\_COMPILER } |
638 |
- setup machine 4 |
\end{center} |
639 |
etc |
where |
640 |
. |
\begin{description} |
641 |
. |
\item[OS] is the name of the operating system (generally the |
642 |
. |
lower-case output of the {\tt 'uname'} command) |
643 |
\end{verbatim} |
\item[HARDWARE] is a string that describes the CPU type and |
644 |
|
corresponds to output from the {\tt 'uname -m'} command: |
645 |
For example, the setup corresponding to a DEC alpha machine is reproduced |
\begin{description} |
646 |
here: |
\item[ia32] is for ``x86'' machines such as i386, i486, i586, i686, |
647 |
\begin{verbatim} |
and athlon |
648 |
case OSF1+mpi: |
\item[ia64] is for Intel IA64 systems (eg. Itanium, Itanium2) |
649 |
echo "Configuring for DEC Alpha" |
\item[amd64] is AMD x86\_64 systems |
650 |
set CPP = ( '/usr/bin/cpp -P' ) |
\item[ppc] is for Mac PowerPC systems |
651 |
set DEFINES = ( ${DEFINES} '-DTARGET_DEC -DWORDLENGTH=1' ) |
\end{description} |
652 |
set KPP = ( 'kapf' ) |
\item[COMPILER] is the compiler name (generally, the name of the |
653 |
set KPPFILES = ( 'main.F' ) |
FORTRAN executable) |
654 |
set KFLAGS1 = ( '-scan=132 -noconc -cmp=' ) |
\end{description} |
655 |
set FC = ( 'f77' ) |
|
656 |
set FFLAGS = ( '-convert big_endian -r8 -extend_source -automatic -call_shared -notransform_loops -align dcommons' ) |
In many cases, the default optfiles are sufficient and will result in |
657 |
set FOPTIM = ( '-O5 -fast -tune host -inline all' ) |
usable Makefiles. However, for some machines or code configurations, |
658 |
set NOOPTFLAGS = ( '-O0' ) |
new ``optfiles'' must be written. To create a new optfile, it is |
659 |
set LIBS = ( '-lfmpi -lmpi -lkmp_osfp10 -pthread' ) |
generally best to start with one of the defaults and modify it to suit |
660 |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F') |
your needs. Like \texttt{genmake2}, the optfiles are all written |
661 |
set RMFILES = ( '*.p.out' ) |
using a simple ``sh''--compatible syntax. While nearly all variables |
662 |
breaksw |
used within \texttt{genmake2} may be specified in the optfiles, the |
663 |
\end{verbatim} |
critical ones that should be defined are: |
664 |
|
|
665 |
Typically, these are the lines that you might need to edit to make \textit{% |
\begin{description} |
666 |
genmake} work on your platform if it doesn't work the first time. \textit{% |
\item[FC] the FORTRAN compiler (executable) to use |
667 |
genmake} understands several options that are described here: |
\item[DEFINES] the command-line DEFINE options passed to the compiler |
668 |
|
\item[CPP] the C pre-processor to use |
669 |
\begin{itemize} |
\item[NOOPTFLAGS] options flags for special files that should not be |
670 |
\item -rootdir=dir |
optimized |
671 |
|
\end{description} |
672 |
indicates where the model root directory is relative to the directory where |
|
673 |
you are compiling. This option is not needed if you compile in the \textit{% |
For example, the optfile for a typical Red Hat Linux machine (``ia32'' |
674 |
bin} directory (which is the default compilation directory) or within the |
architecture) using the GCC (g77) compiler is |
675 |
\textit{verification} tree. |
\begin{verbatim} |
676 |
|
FC=g77 |
677 |
\item -mods=dir1,dir2,... |
DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4' |
678 |
|
CPP='cpp -traditional -P' |
679 |
indicates the relative or absolute paths directories where the sources |
NOOPTFLAGS='-O0' |
680 |
should take precedence over the default versions (located in \textit{model}, |
# For IEEE, use the "-ffloat-store" option |
681 |
\textit{eesupp},...). Typically, this option is used when running the |
if test "x$IEEE" = x ; then |
682 |
examples, see below. |
FFLAGS='-Wimplicit -Wunused -Wuninitialized' |
683 |
|
FOPTIM='-O3 -malign-double -funroll-loops' |
684 |
\item -enable=pkg1,pkg2,... |
else |
685 |
|
FFLAGS='-Wimplicit -Wunused -ffloat-store' |
686 |
enables packages source code \textit{pkg1}, \textit{pkg2},... when creating |
FOPTIM='-O0 -malign-double' |
687 |
the makefile. |
fi |
688 |
|
\end{verbatim} |
689 |
\item -disable=pkg1,pkg2,... |
|
690 |
|
If you write an optfile for an unrepresented machine or compiler, you |
691 |
disables packages source code \textit{pkg1}, \textit{pkg2},... when creating |
are strongly encouraged to submit the optfile to the MITgcm project |
692 |
the makefile. |
for inclusion. Please send the file to the |
693 |
|
\begin{rawhtml} <A href="mail-to:MITgcm-support@mitgcm.org"> \end{rawhtml} |
694 |
\item -platform=machine |
\begin{center} |
695 |
|
MITgcm-support@mitgcm.org |
696 |
specifies the platform for which you want the makefile. In general, you |
\end{center} |
697 |
won't need this option. \textit{genmake} will select the right machine for |
\begin{rawhtml} </A> \end{rawhtml} |
698 |
you (the one you're working on!). However, this option is useful if you have |
mailing list. |
|
a choice of several compilers on one machine and you want to use the one |
|
|
that is not the default (ex: \texttt{pgf77} instead of \texttt{f77} under |
|
|
Linux). |
|
|
|
|
|
\item -mpi |
|
|
|
|
|
this is used when you want to run the model in parallel processing mode |
|
|
under mpi (see section on parallel computation for more details). |
|
699 |
|
|
700 |
\item -jam |
In addition to the optfiles, \texttt{genmake2} supports a number of |
701 |
|
helpful command-line options. A complete list of these options can be |
702 |
|
obtained from: |
703 |
|
\begin{verbatim} |
704 |
|
% genmake2 -h |
705 |
|
\end{verbatim} |
706 |
|
|
707 |
|
The most important command-line options are: |
708 |
|
\begin{description} |
709 |
|
|
710 |
|
\item[--optfile=/PATH/FILENAME] specifies the optfile that should be |
711 |
|
used for a particular build. |
712 |
|
|
713 |
|
If no "optfile" is specified (either through the command line or the |
714 |
|
MITGCM\_OPTFILE environment variable), genmake2 will try to make a |
715 |
|
reasonable guess from the list provided in {\em |
716 |
|
tools/build\_options}. The method used for making this guess is |
717 |
|
to first determine the combination of operating system and hardware |
718 |
|
(eg. "linux\_ia32") and then find a working FORTRAN compiler within |
719 |
|
the user's path. When these three items have been identified, |
720 |
|
genmake2 will try to find an optfile that has a matching name. |
721 |
|
|
722 |
|
\item[--pdepend=/PATH/FILENAME] specifies the dependency file used for |
723 |
|
packages. |
724 |
|
|
725 |
|
If not specified, the default dependency file {\em pkg/pkg\_depend} |
726 |
|
is used. The syntax for this file is parsed on a line-by-line basis |
727 |
|
where each line containes either a comment ("\#") or a simple |
728 |
|
"PKGNAME1 (+|-)PKGNAME2" pairwise rule where the "+" or "-" symbol |
729 |
|
specifies a "must be used with" or a "must not be used with" |
730 |
|
relationship, respectively. If no rule is specified, then it is |
731 |
|
assumed that the two packages are compatible and will function |
732 |
|
either with or without each other. |
733 |
|
|
734 |
|
\item[--pdefault='PKG1 PKG2 PKG3 ...'] specifies the default set of |
735 |
|
packages to be used. |
736 |
|
|
737 |
|
If not set, the default package list will be read from {\em |
738 |
|
pkg/pkg\_default} |
739 |
|
|
740 |
|
\item[--adof=/path/to/file] specifies the "adjoint" or automatic |
741 |
|
differentiation options file to be used. The file is analogous to |
742 |
|
the ``optfile'' defined above but it specifies information for the |
743 |
|
AD build process. |
744 |
|
|
745 |
|
The default file is located in {\em |
746 |
|
tools/adjoint\_options/adjoint\_default} and it defines the "TAF" |
747 |
|
and "TAMC" compilers. An alternate version is also available at |
748 |
|
{\em tools/adjoint\_options/adjoint\_staf} that selects the newer |
749 |
|
"STAF" compiler. As with any compilers, it is helpful to have their |
750 |
|
directories listed in your {\tt \$PATH} environment variable. |
751 |
|
|
752 |
|
\item[--mods='DIR1 DIR2 DIR3 ...'] specifies a list of directories |
753 |
|
containing ``modifications''. These directories contain files with |
754 |
|
names that may (or may not) exist in the main MITgcm source tree but |
755 |
|
will be overridden by any identically-named sources within the |
756 |
|
``MODS'' directories. |
757 |
|
|
758 |
|
The order of precedence for this "name-hiding" is as follows: |
759 |
|
\begin{itemize} |
760 |
|
\item ``MODS'' directories (in the order given) |
761 |
|
\item Packages either explicitly specified or provided by default |
762 |
|
(in the order given) |
763 |
|
\item Packages included due to package dependencies (in the order |
764 |
|
that that package dependencies are parsed) |
765 |
|
\item The "standard dirs" (which may have been specified by the |
766 |
|
``-standarddirs'' option) |
767 |
|
\end{itemize} |
768 |
|
|
769 |
|
\item[--make=/path/to/gmake] Due to the poor handling of soft-links and |
770 |
|
other bugs common with the \texttt{make} versions provided by |
771 |
|
commercial Unix vendors, GNU \texttt{make} (sometimes called |
772 |
|
\texttt{gmake}) should be preferred. This option provides a means |
773 |
|
for specifying the make executable to be used. |
774 |
|
|
775 |
this is used when you want to run the model in parallel processing mode |
\end{description} |
|
under jam (see section on parallel computation for more details). |
|
|
\end{itemize} |
|
776 |
|
|
|
For some of the examples, there is a file called \textit{.genmakerc} in the |
|
|
\textit{input} directory that has the relevant \textit{genmake} options for |
|
|
that particular example. In this way you don't need to type the options when |
|
|
invoking \textit{genmake}. |
|
777 |
|
|
778 |
|
|
779 |
\section{Running the model} |
\section{Running the model} |