Event-Based Automatic Differentiation of OpenMP with OpDiLib
Authors:
- Johannes BlühdornJBJohannes Blühdorn
- Max SagebaumMSMax Sagebaum
- Nicolas R. GaugerNGNicolas R. Gauger
Preprint
Abstract
We present the new software OpDiLib, a universal add-on for classical operator overloading AD tools that enables the automatic differentiation (AD) of OpenMP parallelized code. With it, we establish support for OpenMP features in a reverse mode operator overloading AD tool to an extent that was previously only reported on in source transformation tools. We achieve this with an event-based implementation ansatz that is unprecedented in AD. Combined with modern OpenMP features around OMPT, we demonstrate how it can be used to achieve differentiation without any additional modifications of the source code; neither do we impose a priori restrictions on the data access patterns, which makes OpDiLib highly applicable. For further performance optimizations, restrictions like atomic updates on adjoint variables can be lifted in a fine-grained manner. OpDiLib can also be applied in a semi-automatic fashion via a macro interface, which supports compilers that do not implement OMPT. We demonstrate the applicability of OpDiLib for a pure operator overloading approach in a hybrid parallel environment. We quantify the cost of atomic updates on adjoint variables and showcase the speedup and scaling that can be achieved with the different configurations of OpDiLib in both the forward and the reverse pass.Keywords
All Related Versions
This publication has 30 references indexed in Scilit:
- OMPT-Multiplex: Nesting of OMPT Tools2019
- Algorithmic Differentiation of Pragma-Defined Parallel Regions2014
- OMPT: An OpenMP Tools Application Programming Interface for Performance Analysis2013
- Automatic transition from simulation to one‐shot shape optimization with Navier‐Stokes equationsGAMM-Mitteilungen, 2010
- Numerical solutions of two-dimensional Burgers’ equations by discrete Adomian decomposition methodComputers & Mathematics with Applications, 2010
- Exact and numerical solutions for non-linear Burger’s equation by VIMMathematical and Computer Modelling, 2009
- Parallel Reverse Mode Automatic Differentiation for OpenMP Programs with ADOL-C2008
- Differentiating Fixed Point Iterations with ADOL-C: Gradient Calculation for Fluid Dynamics2008
- An efficient exact adjoint of the parallel MIT General Circulation Model, generated via automatic differentiationFuture Generation Computer Systems, 2005
- Automatic Generation of Efficient Adjoint Code for a Parallel Navier-Stokes SolverLecture Notes in Computer Science, 2002