Simultaneous Preaccumulations in OpenMP-Parallel Automatic Differentiation
- Automatic differentiation (AD) provides accurate derivatives of computer programs in an efficient manner. With extensions to handle programs that are parallelized with MPI or OpenMP, it can also be applied at large scale. The reverse mode of AD is particularly suitable for applications with low-dimensional output and high-dimensional input, as is typical in optimization contexts. However, it requires reversal of the entire computational graph, which can consume substantial amounts of memory. Several techniques exist to make applications of the reverse mode of AD feasible, one of which is preaccumulation, where Jacobians of parts of the computational graph are already assembled as the graph is recorded. If multiple threads share global derivative variables, simultaneous thread-local preaccumulations with shared input variables introduce data races. We address these data races by using thread-local derivative variables instead. We evaluate different vector- and map-based implementations with respect to memory consumption, memory allocation, and memory access times. We implement these alternatives in the AD tool CoDiPack and benchmark them in the multiphysics simulation suite SU2, which is differentiated with CoDiPack together with the add-ons OpDiLib for AD of OpenMP and MeDiPack for AD of MPI.
| Author: | Johannes BlühdornORCiD, Nicolas R. GaugerORCiD |
|---|---|
| URN: | urn:nbn:de:hbz:386-kluedo-97034 |
| DOI: | https://doi.org/10.26204/KLUEDO/9703 |
| Document Type: | Conference Proceeding |
| Language of publication: | English |
| Date of Publication (online): | 2026/03/11 |
| Year of first Publication: | 2026 |
| Publishing Institution: | Rheinland-Pfälzische Technische Universität Kaiserslautern-Landau |
| Date of the Publication (Server): | 2026/03/12 |
| Source: | 3rd NHR Conference 2025 |
| Faculties / Organisational entities: | Kaiserslautern - Fachbereich Informatik |
| DDC-Cassification: | 0 Allgemeines, Informatik, Informationswissenschaft / 004 Informatik |
| 5 Naturwissenschaften und Mathematik / 510 Mathematik | |
| 6 Technik, Medizin, angewandte Wissenschaften / 620 Ingenieurwissenschaften und Maschinenbau | |
| Licence (German): |
