OMP4Py: A pure Python implementation of openMP

Loading...
Thumbnail Image
Identifiers

Publication date

Advisors

Tutors

Editors

Journal Title

Journal ISSN

Volume Title

Publisher

Elsevier
Metrics
Google Scholar
lacobus
Export

Research Projects

Organizational Units

Journal Issue

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 evaluation shows that OMP4Py significantly impacts the performance of various types of applications, although the current threading limitations of Python’s interpreter (v3.13) reduce its effectiveness for numerical

Description

Bibliographic citation

Piñeiro, C., & Pichel, J. C. (2025). OMP4Py: A pure Python implementation of OpenMP. ”Future Generation Computer Systems”, 175. https://doi.org/10.1016/j.future.2025.108035

Relation

Has part

Has version

Is based on

Is part of

Is referenced by

Is version of

Requires

Sponsors

This work was supported by MICINN, Spain [PLEC2021-007662, PID2022-137061OB-C22]; Xunta de Galicia, Spain [ED431G 2019/04, ED431F 2020/08, ED431C 2022/16]; and European Regional Development Fund (ERDF) .

Rights

© 2025 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC license ( http://creativecommons.org/licenses/by- nc/4.0/ ).
Attribution-NonCommercial 4.0 International