A program or library is considered safe when it’s guaranteed that programmer error cannot cause undefined behavior. MPI, both the standard and its implementations, is not designed to be type or memory safe. The standard requires that types must match across point-to-point communications and that collective call arguments must be the same across all ranks; it is up to the user in most cases to avoid these errors, and if not caught, then program behavior is undefined. Existing research attempts to help application developers find these errors using profiling and debugging tools, but these do not focus on solving the problems of safety. These tools are usually designed to catch errors during development but safety errors can depend on the environment, hardware, and input values, thus they are likely to show up even during production runs. To properly bind and use MPI, many modern memory safe languages, such as Rust, have to carefully validate and check for these errors, making it hard to achieve the performance of languages like Fortran and C. Our work examines how to improve MPI safety, both type and memory safety, at the implementation level and within programming languages; in this way it is possible to ensure valid communication and safety whether in development or in production. Our work presents safe point-to-point messaging prototypes within an MPI implementation and as a UCX-based library written in the Rust programming language. These prototypes are both designed to catch point-to-point communication errors at runtime, specifically datatype mismatches. We analyze results from these prototypes to show that catching these types of errors can be done efficiently, both at the level of the language and the implementation.
29 November 2023 in IEEE Transactions on Services Computing
Testing is one of the most important steps in software development–it ensures the quality of software. Continuous Integration (CI) is a widely used testing standard that can report software quality to the developer in a timely manner during development progress. Performance, especially scalability, is another key factor for High Performance Computing (HPC) applications. There are many existing profiling and performance tools for HPC applications, but none of these are integrated into CI tools. In this work, we propose BeeSwarm, an HPC container based parallel scaling performance system that can be easily applied to the current CI test environments. BeeSwarm is mainly designed for HPC application developers who need to monitor how their applications can scale on different compute resources. We demonstrate BeeSwarm using three different HPC applications: CoMD, LULESH and NWChem. We utilize GitHub Actions and provision resources from Google Compute Engine. Our results show that BeeSwarm can be used for scalability and performance testing of a variety of HPC applications, allowing developers to monitor application performance over time.
The Message-Passing Interface (MPI) requires implementations that are able to adapt to new hardware and architectures while ensuring correctness and usability. The most widely used MPI implementations, however, are written in older programming languages that can lead to memory-unsafe code with poor isolation between modules, and complicated interfaces that can lead to serious bugs, all of which leads to difficulty in testing, debugging, and checking for correctness. In order to improve development of MPI implementations, we posit that new components, and key existing code segments, may benefit from being written in the Rust programming language. In this work we reimplement a core component of Open MPI used for intra-node communication in Rust and show that it achieves performance approaching that of the existing, highly optimized, C code, demonstrating that Rust is able to provide performance while allowing for better testing, memory safety guarantees, and correctness.