MPI-rical: Data-Driven MPI Distributed Parallelism Assistance with Transformers

05/16/2023
by   Nadav Schneider, et al.
0

Automatic source-to-source parallelization of serial code for shared and distributed memory systems is a challenging task in high-performance computing. While many attempts were made to translate serial code into parallel code for a shared memory environment (usually using OpenMP), none has managed to do so for a distributed memory environment. In this paper, we propose a novel approach, called MPI-rical, for automated MPI code generation using a transformer-based model trained on approximately 25,000 serial code snippets and their corresponding parallelized MPI code out of more than 50,000 code snippets in our corpus (MPICodeCorpus). To evaluate the performance of the model, we first break down the serial code to MPI-based parallel code translation problem into two sub-problems and develop two research objectives: code completion defined as given a location in the source code, predict the MPI function for that location, and code translation defined as predicting an MPI function as well as its location in the source code. We evaluate MPI-rical on MPICodeCorpus dataset and on real-world scientific code benchmarks and compare its performance between the code completion and translation tasks. Our experimental results show that while MPI-rical performs better on the code completion task than the code translation task, the latter is better suited for real-world programming assistance, in which the tool suggests the need for an MPI function regardless of prior knowledge. Overall, our approach represents a significant step forward in automating the parallelization of serial code for distributed memory systems, which can save valuable time and resources for software developers and researchers. The source code used in this work, as well as other relevant sources, are available at: https://github.com/Scientific-Computing-Lab-NRCN/MPI-rical

READ FULL TEXT
research
04/27/2022

Learning to Parallelize in a Shared-Memory Environment with Transformers

In past years, the world has switched to many-core and multi-core shared...
research
09/19/2018

LFRic: Meeting the challenges of scalability and performance portability in Weather and Climate models

This paper describes LFRic: the new weather and climate modelling system...
research
05/16/2023

Advising OpenMP Parallelization via a Graph-Based Approach with Transformers

There is an ever-present need for shared memory parallelization schemes ...
research
05/17/2023

OpenLB User Guide: Associated with Release 1.6 of the Code

OpenLB is an object-oriented implementation of LBM. It is the first impl...
research
05/10/2023

Improving the performance of classical linear algebra iterative methods via hybrid parallelism

We propose fork-join and task-based hybrid implementations of four class...
research
11/13/2017

ABCpy: A High-Performance Computing Perspective to Approximate Bayesian Computation

ABCpy is a highly modular scientific library for Approximate Bayesian Co...
research
01/14/2016

Evaluation of the Partitioned Global Address Space (PGAS) model for an inviscid Euler solver

In this paper we evaluate the performance of Unified Parallel C (which i...

Please sign up or login with your details

Forgot password? Click here to reset