Next: 5.2.3 The AD build
Up: 5.2 TLM and ADM
Previous: 5.2.1 General setup
Contents
5.2.2 Building the AD code
The build process of an AD code is very similar to building
the forward model. However, depending on which AD code one wishes
to generate, and on which AD tool is available (TAF or TAMC),
the following make targets are available:
|
AD-target |
output |
description |
(1) |
<MODE><TOOL>only |
<MODE>_<TOOL>_output.f |
generates code for MODE using TOOL |
|
|
|
no make dependencies on .F .h |
|
|
|
useful for compiling on remote platforms |
(2) |
<MODE><TOOL> |
<MODE>_<TOOL>_output.f |
generates code for MODE using TOOL |
|
|
|
includes make dependencies on .F .h |
|
|
|
i.e. input for TOOL may be re-generated |
(3) |
<MODE>all |
mitgcmuv_<MODE> |
generates code for MODE using TOOL |
|
|
|
and compiles all code |
|
|
|
(use of TAF is set as default) |
Here, the following placeholders are used
- TOOL
-
- MODE
- ad generates the adjoint model (ADM)
- ftl generates the tangent linear model (TLM)
- svd generates both ADM and TLM for
singular value decomposition (SVD) type calculations
For example, to generate the adjoint model using TAF after routines (.F)
or headers (.h) have been modified, but without compilation,
type make adtaf;
or, to generate the tangent linear model using TAMC without
re-generating the input code, type make ftltamconly.
A typical full build process to generate the ADM via TAF would
look like follows:
% mkdir build
% cd build
% ../../../tools/genmake2 -mods=../code_ad
% make depend
% make adall
Next: 5.2.3 The AD build
Up: 5.2 TLM and ADM
Previous: 5.2.1 General setup
Contents
mitgcm-support@dev.mitgcm.org
Copyright © 2002
Massachusetts Institute of Technology |
|
|