4:00 PM - 4:15 PM
[MGI30-09] Interfaces and Programming of OpenACC for MN-Core
Keywords:MN-Core, OpenACC, API, Programming, Compiler, Accelerator
As part of the Post-Fugaku Feasibility Study, which runs from autumn 2022 to March 2025, we have begun developing general-purpose programming environments for MN-Core to meet the needs of real-world HPC application users. In these environments, we are developing MNCL as a low-level programming environment and OpenACC for MN-Core (OpenACC/MN-Core) as a high-level programming environment. MNCL is a specialized OpenCL-like language for MN-Core. The primary advantage of supporting OpenACC is code portability. OpenACC is a compiler directive-based API that supports C, C++, and Fortran, making it easy to port code to an accelerator by simply adding compiler directives. Additionally, supporting OpenACC allows for the porting of existing OpenACC-based code applications for GPU to MN-Core.
OpenACC/MN-Core provides extension APIs tailored to MN-Core’s architecture, which follows the distributed memory model, in contrast to the shared memory model used by GPU and CPU architectures. These extension APIs are inspired by High Performance Fortran (HPF) and XcalableMP, both compiler directive-based APIs that offer an alternative to MPI for inter-node parallel computing, which also follows the distributed memory model. These reference APIs have been implemented in compilers, which confirms the feasibility of code compilation and the practicality of their interfaces.
We have developed a prototype compiler for OpenACC/MN-Core. This is a Source-to-Source compiler that translates OpenACC code written in C into MNCL. The compiler uses XcodeML, an XML-based intermediate representation, to facilitate translation between C and MNCL, leveraging existing frontend and backend components customized for OpenACC/MN-Core. Within the compiler, XcodeML is analyzed and translated by original middleware developed using lxml, a Python library for XML processing. Ultimately, the compiler generates both MNCL host code and MNCL device code. We also plan to develop a Fortran version of this compiler.
This presentation will introduce the OpenACC/MN-Core interfaces and provide examples of programming and code compilation.