Pragma driven shared memory parallelism in Zig by supporting OpenMP loop directives

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kacs, David, Lee, Joseph, Zarins, Justs, Brown, Nick
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914960658923520
author Kacs, David
Lee, Joseph
Zarins, Justs
Brown, Nick
author_facet Kacs, David
Lee, Joseph
Zarins, Justs
Brown, Nick
contents The Zig programming language, which is designed to provide performance and safety as first class concerns, has become popular in recent years. Given that Zig is built upon LLVM, and-so enjoys many of the benefits provided by the ecosystem, including access to a rich set of backends, Zig has significant potential for high performance workloads. However, it is yet to gain acceptance in HPC and one of the reasons for this is that support for the pragma driven shared memory parallelism is missing. In this paper we describe enhancing the Zig compiler to add support for OpenMP loop directives. Then exploring performance using NASA's NAS Parallel Benchmark (NPB) suite. We demonstrate that not only does our integration of OpenMP with Zig scale comparatively to Fortran and C reference implementations of NPB, but furthermore Zig provides up to a 1.25 times performance increase compared to Fortran.
format Preprint
id arxiv_https___arxiv_org_abs_2409_20148
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Pragma driven shared memory parallelism in Zig by supporting OpenMP loop directives
Kacs, David
Lee, Joseph
Zarins, Justs
Brown, Nick
Distributed, Parallel, and Cluster Computing
Programming Languages
The Zig programming language, which is designed to provide performance and safety as first class concerns, has become popular in recent years. Given that Zig is built upon LLVM, and-so enjoys many of the benefits provided by the ecosystem, including access to a rich set of backends, Zig has significant potential for high performance workloads. However, it is yet to gain acceptance in HPC and one of the reasons for this is that support for the pragma driven shared memory parallelism is missing. In this paper we describe enhancing the Zig compiler to add support for OpenMP loop directives. Then exploring performance using NASA's NAS Parallel Benchmark (NPB) suite. We demonstrate that not only does our integration of OpenMP with Zig scale comparatively to Fortran and C reference implementations of NPB, but furthermore Zig provides up to a 1.25 times performance increase compared to Fortran.
title Pragma driven shared memory parallelism in Zig by supporting OpenMP loop directives
topic Distributed, Parallel, and Cluster Computing
Programming Languages
url https://arxiv.org/abs/2409.20148