Saved in:
Bibliographic Details
Main Authors: Iqbal, Nafees, Brown, Jed
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2509.10803
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909786111475712
author Iqbal, Nafees
Brown, Jed
author_facet Iqbal, Nafees
Brown, Jed
contents The Message Passing Interface (MPI) is a fundamental tool for building high-performance computing (HPC) applications, enabling efficient communication across distributed systems. Despite its widespread adoption, MPI's low-level interface and lack of built-in type safety make it prone to runtime errors, undefined behavior, and debugging challenges, especially in large-scale applications. Rust, a modern systems programming language, offers a compelling solution with its strong type system, which enforces memory and type safety at compile time without compromising performance. This paper introduces a type-safe communication framework for MPI, built on the RSMPI library, to address the limitations of traditional MPI programming. At its core is the TypedCommunicator, an abstraction that enforces static type safety in point-to-point communication operations. By leveraging Rust's Equivalence trait, our framework guarantees that only compatible types can participate in communication, catching mismatches either at compile time or through runtime validation. The framework supports both single-value and slice-based communication, providing an intuitive API for diverse data structures. Our implementation demonstrates that this approach eliminates common MPI errors, improves developer productivity, and maintains performance, adhering to Rust's principle of zero-cost abstractions. This work lays the foundation for extending type safety to collective operations, advancing the robustness of parallel computing in Rust.
format Preprint
id arxiv_https___arxiv_org_abs_2509_10803
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Enhancing Type Safety in MPI with Rust: A Statically Verified Approach for RSMPI
Iqbal, Nafees
Brown, Jed
Distributed, Parallel, and Cluster Computing
The Message Passing Interface (MPI) is a fundamental tool for building high-performance computing (HPC) applications, enabling efficient communication across distributed systems. Despite its widespread adoption, MPI's low-level interface and lack of built-in type safety make it prone to runtime errors, undefined behavior, and debugging challenges, especially in large-scale applications. Rust, a modern systems programming language, offers a compelling solution with its strong type system, which enforces memory and type safety at compile time without compromising performance. This paper introduces a type-safe communication framework for MPI, built on the RSMPI library, to address the limitations of traditional MPI programming. At its core is the TypedCommunicator, an abstraction that enforces static type safety in point-to-point communication operations. By leveraging Rust's Equivalence trait, our framework guarantees that only compatible types can participate in communication, catching mismatches either at compile time or through runtime validation. The framework supports both single-value and slice-based communication, providing an intuitive API for diverse data structures. Our implementation demonstrates that this approach eliminates common MPI errors, improves developer productivity, and maintains performance, adhering to Rust's principle of zero-cost abstractions. This work lays the foundation for extending type safety to collective operations, advancing the robustness of parallel computing in Rust.
title Enhancing Type Safety in MPI with Rust: A Statically Verified Approach for RSMPI
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2509.10803