Skip to main content

heimdallr: Improving Compile Time Correctness Checking for Message Passing with Rust

  • Conference paper
  • First Online:
High Performance Computing (ISC High Performance 2021)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/parcio/heimdallr.

References

  1. 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

    Article  MathSciNet  Google Scholar 

  2. 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

  3. 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)

    Google Scholar 

  4. 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)

    Article  Google Scholar 

  5. Droste, A., Kuhn, M., Ludwig, T.: MPI-checker: static analysis for MPI. In: LLVM@SC, pp. 3:1–3:10. ACM (2015)

    Google Scholar 

  6. 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

  7. bincode org: Bincode. https://github.com/bincode-org/bincode (2021). Accessed on Mar 2021

  8. 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

  9. serde rs: Serde. https://serde.rs/ (2021). Accessed on Mar 2021

  10. rsmpi: rsmpi. https://github.com/rsmpi/rsmpi (2021). Accessed on Mar 2021

  11. Vanderwiel, S.P., Nathanson, D., Lilja, D.J.: Complexity and performance in parallel programming languages. In: HIPS, p. 3. IEEE Computer Society (1997)

    Google Scholar 

  12. Yu, Z., Song, L., Zhang, Y.: Fearless Concurrency? Understanding Concurrent Programming Safety in Real-World Rust Software. ArXiv: CoRR abs/1902.01906 (2019)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michael Blesel .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics