UNIVERSITY OF HERTFORDSHIRE
COMPUTER SCIENCE RESEARCH COLLOQUIUM
presents
"Putting Automatic Differentiation into the NAGWare
Fortran 95 Compiler"
Dr. Jan Riehme
(RWTH Aachen University, Germany & University of Hertfordshire, UK)
[Joint work with Uwe Naumann, Bruce Christianson, Dimitrij Gendler]
4 November 2009 (Wednesday)
Lecture Theatre E351
Hatfield, College Lane Campus
3 - 4 pm
Everyone is Welcome to Attend
Refreshments will be available
Abstract:
For a given mathematical function implemented as a computer program the
application of Automatic Differentiation (AD) techniques allows to compute not
only function values but also sensitivities of the function values (outputs)
with respects to some or all arguments (inputs of the program) more or less
without intervention of a programmer.
In particular, the so-called adjoint, or reverse mode of AD is capable of
computing a complete set of sensitivities at a cost of (in theory) about three
function evaluations in total, regardless of the number of inputs. In order to
do this, the control flow of the original program must be reversed, so that
the adjoint (sensitivity) values are computed in reverse order to the original
function value.
Accurate sensitivities are of immense value in many areas of Engineering and
Scientific Computing, particularly where a design is being simulated in order
to optimize it. Such problems often contain many thousands of
inputs. Obtaining such sensitivities using finite differences is inaccurate
and inefficient (since it involves at least one function evaluation for each
input) and obtaining adjoints by hand differentiation of the code is tedious,
error prone, and makes the models hard to update.
Previous approaches to AD involved either operator overloading (assumed to be
inefficient, and hard to optimize) or transforming source code by
preprocessing (source transformation, hard to develop and debug). In 2001 a
collaboration (CompAD) began between the University of Hertfordshire, and the
Numerical Algorithms Group, Oxford, with the objective of combining the best
of both approaches and developing an industrial strength Fortran compiler with
native support for AD.
This collaboration, funded through a series of projects by EPSRC, was soon
joined by RWTH Aacchen (the German designated Centre of Excellence for
Computational Engineering Science), and we now (halfway through the third
phase) have an AD-tool with run-time efficiencies for evolutions (obtained
even for operator overloading using a multicore approach) close to the
theoretical optima.
An AD source transformation tool or adjoint compiler needs to reverse the data
flow and call graph of the original program. Beside the technical difficulties
of that task a basic questions of reverse mode AD emerges here: The compiler
needs to decide which values (local variables, global variables, procedure
arguments) are required in the reverse sweep, and should they be stored in the
forward sweep or recomputed in the reverse sweep? It is known that finding an
optimal trade-off between storage and recompute is an NP-complete problem.
This talk will explore some of these challenges, discuss the current state of
the AD-enabled Fortran compiler, explain some of its different AD
capabilities, and show successful applications.
---------------------------------------------------
Hertfordshire Computer Science Research Colloquium
http://homepages.feis.herts.ac.uk/~nehaniv/colloq