Implementing OpenMP for Zig to enable its use in HPC context
David Kacs, Nick Brown, Joseph Lee

TL;DR
This paper introduces partial OpenMP support in Zig, demonstrating its potential as a safe, modern alternative for high-performance computing applications with comparable or superior performance to traditional HPC languages.
Contribution
We added partial OpenMP support to Zig using LLVM tooling, enabling its use in HPC and demonstrating its competitive performance.
Findings
Zig with OpenMP achieves performance comparable to C and Fortran.
Partial OpenMP support in Zig is feasible and effective.
Zig offers a safer, modern language option for HPC development.
Abstract
This extended abstract explores supporting OpenMP in the Zig programming language. Whilst, C and Fortran are currently the main languages used to implement HPC applications, Zig provides a similar level of performance complimented with several modern language features, such as enforcing memory safety. However, Zig lacks support for OpenMP which is the de facto threaded programming technology. Leveraging Zig's LLVM compiler tooling, we have added partial support for OpenMP to the Zig compiler and demonstrated that the performance attained by using Zig with OpenMP is comparable to, and in come cases exceeds, that of conventional HPC languages. Consequently we demonstrate that Zig is a viable and important programming technology to use for HPC, and this work paves the way for more HPC features to be added to Zig, ultimately providing HPC developers with the option of using a safer, more…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
