Abstract
Message passing is the foremost parallelization method used in high-performance computing (HPC). Parallel programming in general and especially message passing strongly increase the complexity and susceptibility to errors of programs. The de-facto standard technologies used to realize message passing applications in HPC are MPI with C/C++ or Fortran code. These technologies offer high performance but do not come with many compile-time correctness guarantees and are quite error-prone. This paper presents our work on a message passing library implemented in Rust that focuses on compile-time correctness checks. In our design, we apply Rust’s memory and concurrency safety features to a message passing context and show how common error classes from MPI applications can be avoided with this approach.
Problems with the type safety of transmitted messages can be mitigated through the use of generic programming concepts at compile time and completely detected during runtime using data serialization methods. Our library is able to use Rust’s memory safety features to achieve data buffer safety for non-blocking message passing operations at compile time.
A performance comparison between our proof of concept implementation and MPI is included to evaluate the practicality of our approach. While the performance of MPI could not be beaten, the results still are promising. Moreover, we are able to achieve clear improvements in the aspects of correctness and usability.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Amaral, V., et al.: Programming languages for data-intensive HPC applications: a systematic mapping study. Parallel Comput. 91, 102584 (2020). https://doi.org/10.1016/j.parco.2019.102584
Asanović, K., et al.: The landscape of parallel computing research: a view from Berkeley. Technical report UCB/EECS-2006-183, EECS Department, University of California, Berkeley (2006). http://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-183.html
Ba, T.N., Arora, R.: Towards developing a repository of logical errors observed in parallel code for teaching code correctness. In: EduHPC@SC, pp. 69–77. IEEE (2018)
Chamberlain, B.L., Callahan, D., Zima, H.P.: Parallel programmability and the chapel language. Int. J. High Perform. Comput. Appl. 21(3), 291–312 (2007)
Droste, A., Kuhn, M., Ludwig, T.: MPI-checker: static analysis for MPI. In: LLVM@SC, pp. 3:1–3:10. ACM (2015)
Matsakis, N.D.: An alias-based formulation of the borrow checker. http://smallcultfollowing.com/babysteps/blog/2018/04/27/an-alias-based-formulation-of-the-borrow-checker/ (2018). Accessed on Mar 2021
bincode org: Bincode. https://github.com/bincode-org/bincode (2021). Accessed on Mar 2021
R, B.: “Rust is the future of systems programming, C is the new assembly”: intel principal engineer, Josh Triplett. https://hub.packtpub.com/rust-is-the-future-of-systems-programming-c-is-the-new-assembly-intel-principal-engineer-josh-triplett/ (2019). Accessed on Mar 2021
serde rs: Serde. https://serde.rs/ (2021). Accessed on Mar 2021
rsmpi: rsmpi. https://github.com/rsmpi/rsmpi (2021). Accessed on Mar 2021
Vanderwiel, S.P., Nathanson, D., Lilja, D.J.: Complexity and performance in parallel programming languages. In: HIPS, p. 3. IEEE Computer Society (1997)
Yu, Z., Song, L., Zhang, Y.: Fearless Concurrency? Understanding Concurrent Programming Safety in Real-World Rust Software. ArXiv: CoRR abs/1902.01906 (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Blesel, M., Kuhn, M., Squar, J. (2021). heimdallr: Improving Compile Time Correctness Checking for Message Passing with Rust. In: Jagode, H., Anzt, H., Ltaief, H., Luszczek, P. (eds) High Performance Computing. ISC High Performance 2021. Lecture Notes in Computer Science(), vol 12761. Springer, Cham. https://doi.org/10.1007/978-3-030-90539-2_13
Download citation
DOI: https://doi.org/10.1007/978-3-030-90539-2_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-90538-5
Online ISBN: 978-3-030-90539-2
eBook Packages: Computer ScienceComputer Science (R0)