|   | Computational & Technology Resources an online resource for computational, engineering & technology publications | 
| Civil-Comp Proceedings ISSN 1759-3433 CCP: 84 PROCEEDINGS OF THE FIFTH INTERNATIONAL CONFERENCE ON ENGINEERING COMPUTATIONAL TECHNOLOGY Edited by: B.H.V. Topping, G. Montero and R. Montenegro Paper 112 Intraprocedural Adjoint Code Generated by the Differentiation-Enabled NAGWare Fortran Compiler M. Maier and U. Naumann Department of Computer Science, RWTH Aachen University, Germany Full Bibliographic Reference for this paper M. Maier, U. Naumann, "Intraprocedural Adjoint Code Generated by the Differentiation-Enabled NAGWare Fortran Compiler", in B.H.V. Topping, G. Montero, R. Montenegro, (Editors), "Proceedings of the Fifth International Conference on Engineering Computational Technology", Civil-Comp Press, Stirlingshire, UK, Paper 112, 2006. doi:10.4203/ccp.84.112 Keywords: adjoint code, NAGWare Fortran compiler. Summary In this paper we report on recent advances made in the development of the first
Fortran compiler that provides intrinsic support for computing derivatives.
We focus on the automatic generation of an intraprocedural
adjoint code. Technical details of the modifications made to the internal
representation as well as case studies are presented. For example, the new
feature allows for the computation of large gradients at a computational
cost that is independent of their sizes. Numerous numerical algorithms,
derivative-based optimization algorithms in particular, will benefit
both from the convenience of the approach and from the efficiency of the
intrinsic derivative code.
 
Consider the computation of the gradient 
 The classical approach to numerical differentiation uses finite difference quotients to approximate the values of derivatives. Centered finite differences defined by   
The computational complexity of the accumulation of the full gradient
by finite difference approximation is
O(n) Every single input needs to be perturbed which turns out to
be infeasible for large n. The solution comes in the
form of reverse mode automatic differentiation [1].
It builds the basis for semantic source transformation algorithms
that generate adjoint code     becomes equal to the
gradient  when setting  A single evaluation of the adjoint
code is sufficient (compared with at least  evaluations of the original
code when finite differences are used). We describe a research prototype of the NAGWare Fortran compiler that provides intrinsic support for the generation of adjoint code. The functionality is currently limited to the intraprocedural level. A comparison of the runtime behavior of adjoint code for Equation (86) compared with finite difference approximation of the gradient is shown in Figure 1. This figure alone provides enough justification for the considerable development effort that adding adjoint capabilities to a compiler represents. References 
 purchase the full-text of this paper (price £20) 
go to the previous paper | |