To allow a quick trial we offer a prebuilt
binary:
Download the
<platform>.tgz
file and unpack it, for example using
tar
-zxvf <platform>.tgz
Simple Examples:
This will create a directory called
OpenAD_binaries.
To run the test examples:
cd
OpenAD_binaries
./runExamples.sh
[-fc <Fortran 90 compiler>]
[-cc <C compiler>] [<test>]
where:
- <Fortran 90 compiler>
is the Fortran9X compiler of your choice, e.g. NAG's f95 or Intel's
ifort
- <C compiler> is
the C compiler compatible to your Fortran9X compiler, e.g. gcc for f95 or icc
for ifort
- <test> may be empty which executes all test
examples or one of:
test
problem
|
Tangent
Linear Code
|
Split
Adjoint Code
|
Joint
Adjoint Code
|
toy
problem
|
toy_tlm
|
toy_adm_split
|
toy_adm_joint
|
Flow in a Driven Cavity
|
fdc_tlm
|
fdc_adm_split
|
fdc_adm_joint
|
Box Model
|
box_tlm
|
box_adm_split
|
box_adm_joint
|
For example, to create and run the toy problem adjoint code in split
mode with the Intel compilers run:
./runExamples.sh -fc ifort
-cc icc box_adm_split
which produces an output showing the result with divided first followed
by the result for automatic differentiation:
***** toy_adm_split
transformation ........ compile ............ execute
------------------output
begin
DD:
F(1,1)=
0.968996938663261
AD:
F(1,1)=
0.968912421710645
------------------output
end
***** done
The source code for the respective tests can be found in the
OpenAD_binaries/examples/<test>
directories. Each contains the test problem's source code in a
file
head.f
and a driver in a file
driver.f90.
The shell script
runExamples.sh
copies the files into the
OpenAD_binaries
directory and invokes
make (see
also
OpenAD_binaries/Makefile)
which executes the transformation stages, compiles the necessary
modules, the driver, and the transformed source code, and finally runs
the test.These example codes can be used as a template
for other experiments. For more information please refer to the
sections listed in the left frame under "Technical Details".
Shallow Water Model:
The
shallow water model code
requires the
netcdf
library which supplied as a binary built with the Intel 8.0
compilers. Therefore
this examples
requires the Intel compilers to be installed. Assuming you are
in the directory
OpenAD_binaries
cd ShallowWater_SL
make
cd exe
./shallow_water
which invokes the original model
./shallow_water_OpenAD
invokes the augmented model for gradient calculation with two level
nested checkpointing and a
hybrid between split and joint mode which brings down the needed
storage space at the expense of repeated recomputations.
If there are problems with the binaries due
library and compiler inconsistencies please
download
the source code and build your own version. This has the added
advantage of obtaining the most recent version as the binaries on this
page cannot be updated for every code change