OMP4Py: a pure Python implementation of OpenMP
C\'esar Pi\~neiro, Juan C. Pichel

TL;DR
OMP4Py introduces a pure Python implementation of OpenMP, enabling parallel programming in Python with familiar directives, potentially improving performance for multithreaded applications despite current interpreter limitations.
Contribution
This work presents the first pure Python implementation of OpenMP, bridging the gap between Python and traditional HPC languages for parallel programming.
Findings
OMP4Py enables OpenMP-style parallelism in Python.
Performance improvements observed in various applications.
Current Python GIL limits effectiveness for numerical tasks.
Abstract
Python demonstrates lower performance in comparison to traditional high performance computing (HPC) languages such as C, C++, and Fortran. This performance gap is largely due to Python's interpreted nature and the Global Interpreter Lock (GIL), which hampers multithreading efficiency. However, the latest version of Python includes the necessary changes to make the interpreter thread-safe, allowing Python code to run without the GIL. This important update will enable users to fully exploit multithreading parallelism in Python. In order to facilitate that task, this paper introduces OMP4Py, the first pure Python implementation of OpenMP. We demonstrate that it is possible to bring OpenMP's familiar directive-based parallelization paradigm to Python, allowing developers to write parallel code with the same level of control and flexibility as in C, C++, or Fortran. The experimental…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputational Physics and Python Applications
