Automating Automatic Differentiation: Coupling AD and PETSc

Paul Hovland

Boyana Norris Barry Smith MCS Division Argonne National Laboratory Bldg 221, Rm. C-236 9700 S Cass Ave Argonne, IL 60439


Despite its name, automatic differentiation (AD) is often far from an automatic process. Often one must specify independent and dependent variables, indicate the derivative quantitities to be computed, and perhaps even provide information about the structure of the Jacobians or Hessians being computed. However, when AD is used in conjunction with a toolkit with well-defined interfaces, many of these issues do not arise. We describe recent research into coupling the ADIC and ADIFOR automatic differentiation tools with PETSc, a toolkit for the parallel numerical solution of PDEs. This research leverages the interfaces, objects, and domain decomposition strategy of PETSc to make the AD process very nearly transparent.