Reproduce “Event-Based Automatic Differentiation of OpenMP with OpDiLib” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Johannes Blühdorn, Max Sagebaum, Nicolas R. Gauger

OpDiLib extends classical operator overloading Automatic Differentiation to OpenMP parallelized code, leveraging the OpenMP Tools (OMPT) API for fully automatic differentiation without requiring source code modifications. The library achieves robust performance and scaling for scientific simulations, while offering fine-grained control over adjoint variable updates for optimal efficiency.

Key insights

  • The OpenMP Tools (OMPT) API provides the necessary callback mechanisms to enable fully automatic differentiation of OpenMP code using operator overloading tools, eliminating manual source code modifications.
  • Achieving high performance and scalability in the AD reverse pass for OpenMP-parallelized code critically depends on the ability to control adjoint variable update strategies, particularly by avoiding atomic operations where data access patterns permit.
  • An event-based logic can correctly reverse complex OpenMP constructs, including synchronization regions, mutexes, and reductions, by pushing corresponding reverse actions onto thread-local tapes.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.