OpDiLib – Open Multiprocessing Differentiation Library

OpDiLib is a universal add-on for reverse mode operator overloading AD tools that enables the differentiation of OpenMP parallel code. OpDiLib is written in C++ and relies on modern OpenMP features around OMPT to achieve differentiation without any additional modifications of the source code.


  • interface for the coupling with operator overloading AD tools
  • fully automatic differentiation via OMPT
  • semi-automatic differentiation via a macro interface without OMPT
  • automatic deduction of a parallel reverse pass
  • no a priori restrictions of the data access patterns
  • tools for the performance optimization of the parallel reverse pass
  • AD handling for most features of the OpenMP 2.5 specification
    • atomic directives are not handled
    • flush directives are not handled

Source Code

OpDiLib is released as open source software under the LGPLv3 license.
The source code is available on GitHub.

Contact: opdi@scicomp.uni-kl.de
Newsletter: opdi-info@scicomp.uni-kl.de
Lead Developer: Johannes Blühdorn
Responsibility: Prof. Dr. Nicolas R. Gauger


If you use OpDiLib in one of your applications and write a paper, please cite us!


J. Blühdorn, M. Sagebaum, N. R. Gauger

Event-Based Automatic Differentiation of OpenMP with OpDiLib Journal Article

In: ACM Transactions on Mathematical Software, vol. 49, iss. 1, no. 3, pp. 1–31, 2023.

Abstract | Links | BibTeX