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 modern language for creating high performance applications.
翻译:本扩展摘要探讨了在Zig编程语言中支持OpenMP的可行性。尽管C和Fortran目前是实现高性能计算应用的主要语言,但Zig在提供相近性能水平的同时,还具备多种现代语言特性,例如强制内存安全。然而,Zig缺乏对OpenMP这一事实上的线程编程技术的支持。通过利用Zig的LLVM编译器工具链,我们为Zig编译器添加了部分OpenMP支持,并证明使用Zig结合OpenMP所获得的性能与传统高性能计算语言相当,在某些情况下甚至更优。因此,我们证明Zig是一种可行且重要的高性能计算编程技术,这项工作为Zig添加更多高性能计算特性铺平了道路,最终为高性能计算开发者提供了使用更安全、更现代的语言创建高性能应用程序的选择。