1 |
heimbach |
1.1 |
%********************************************************************** |
2 |
|
|
\section{Adjoint code generation using OpenAD} |
3 |
|
|
\label{sec_ad_openad} |
4 |
|
|
\begin{rawhtml} |
5 |
|
|
<!-- CMIREDIR:sec_ad_openad: --> |
6 |
|
|
\end{rawhtml} |
7 |
|
|
%********************************************************************** |
8 |
|
|
|
9 |
|
|
Authors: Jean Utke, Patrick Heimbach and Chris Hill |
10 |
|
|
|
11 |
|
|
\subsection{Introduction} |
12 |
|
|
|
13 |
|
|
The development of OpenAD was initiated as part of the |
14 |
|
|
ACTS (Adjoint Compiler Technology \& Standards) project funded by the NSF Information Technology Research (ITR) program. |
15 |
|
|
The main goals for OpenAD initially defined for the ACTS project are: |
16 |
|
|
% |
17 |
|
|
\begin{enumerate} |
18 |
|
|
% |
19 |
|
|
\item |
20 |
|
|
develop a flexible, modular, open source tool that can ge`nerate adjoint codes of numerical simulation programs, |
21 |
|
|
% |
22 |
|
|
\item |
23 |
|
|
establish a platform for easy implementation and testing of source transformation algorithms via a language-independent abstract intermediate representation, |
24 |
|
|
% |
25 |
|
|
\item |
26 |
|
|
support for source code written in C and Fortan, |
27 |
|
|
% |
28 |
|
|
\item |
29 |
|
|
generate efficient tangent linear and adjoint for the |
30 |
|
|
MIT general circulation model. |
31 |
|
|
% |
32 |
|
|
\end{enumerate} |
33 |
|
|
|
34 |
|
|
OpenAD's homepage is at \texttt{http://www-unix.mcs.anl.gov/OpenAD/}. |
35 |
|
|
A development WIKI is at |
36 |
|
|
\texttt{http://wiki.mcs.anl.gov/OpenAD/index.php/Main\_Page}. |
37 |
|
|
From the WIKI's main page, click on \texttt{Handling GCM} for |
38 |
|
|
various aspects pertaining to differentiating the MITgcm with OpenAD. |
39 |
|
|
|
40 |
|
|
\subsection{Downloading and installing OpenAD} |
41 |
|
|
|
42 |
|
|
The OpenAD webpage has a detailed description on how to download and |
43 |
|
|
build OpenAD. From its homepage, please click on |
44 |
|
|
\texttt{Download Test Binaries}. |
45 |
|
|
You may either download pre-built binaries for quick trial, |
46 |
|
|
or follow the detailed build process described at |
47 |
|
|
\texttt{http://www-unix.mcs.anl.gov/OpenAD/access.html} |
48 |
|
|
|
49 |
|
|
\subsection{Building MITgcm adjoint with OpenAD} |
50 |
|
|
|
51 |
|
|
\textbf{17-January-2008} |
52 |
|
|
|
53 |
|
|
OpenAD was successfully built on head node of |
54 |
|
|
\texttt{itrda.acesgrid.org}, for following system: |
55 |
|
|
|
56 |
|
|
\begin{verbatim} |
57 |
|
|
> uname -a |
58 |
|
|
Linux itrda 2.6.22.2-42.fc6 #1 SMP Wed Aug 15 12:34:26 EDT 2007 i686 i686 i386 GNU/Linux |
59 |
|
|
|
60 |
|
|
> cat /proc/version |
61 |
|
|
Linux version 2.6.22.2-42.fc6 (brewbuilder@hs20-bc2-4.build.redhat.com) |
62 |
|
|
(gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #1 SMP Wed Aug 15 12:34:26 EDT 2007 |
63 |
|
|
|
64 |
|
|
> module load ifc/9.1.036 icc/9.1.042 |
65 |
|
|
\end{verbatim} |
66 |
|
|
|
67 |
|
|
Head of MITgcm branch (checkpoint59m with some modif.s) was used for building |
68 |
|
|
adjoint code. |
69 |
|
|
Following routing needed special care (revert to revision 1.1): |
70 |
|
|
\\ |
71 |
|
|
\texttt{MITgcm\_contrib/heimbach/OpenAD/OAD\_support/active\_module.f90 } |
72 |
|
|
|
73 |
|
|
|