Skip to main content

Issues in Developing a Thread-Safe MPI Implementation

  • Conference paper
Recent Advances in Parallel Virtual Machine and Message Passing Interface (EuroPVM/MPI 2006)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4192))

Abstract

The MPI-2 Standard has carefully specified the interaction between MPI and user-created threads, with the goal of enabling users to write multithreaded programs while also enabling MPI implementations to deliver high performance. In this paper, we describe and analyze what the MPI Standard says about thread safety and what it implies for an implementation. We classify the MPI functions based on their thread-safety requirements and discuss several issues to consider when implementing thread safety in MPI. We use the example of generating new context ids (required for creating new communicators) to demonstrate how a simple solution for the single-threaded case cannot be used when there are multiple threads and how a naïve thread-safe algorithm can be expensive. We then present an algorithm for generating context ids that works efficiently in both single-threaded and multithreaded cases.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Analysis of thread safety needs of MPI routines, http://www.mcs.anl.gov/mpi/mpich2/developer/design/threadlist.htm

  2. Demaine, E.D.: A threads-only MPI implementation for the development of parallel programs. In: Proc. of the 11th International Symposium on High Performance Computing Systems, July 1997, pp. 153–163 (1997)

    Google Scholar 

  3. García, F., Calderón, A., Carretero, J.: MiMPI: A multithread-safe implementation of MPI. In: Proc. of 6th European PVM/MPI Users’ Group Meeting, September 1999, pp. 207–214 (1999)

    Google Scholar 

  4. Lee, E.A.: The problem with threads. Computer 39(5), 33–42 (2006)

    Article  Google Scholar 

  5. Message Passing Interface Forum. MPI-2: Extensions to the Message-Passing Interface (July 1997), http://www.mpi-forum.org/docs/docs.html

  6. MPICH2, http://www.mcs.anl.gov/mpi/mpich2

  7. Plachetka, T.: Quasi- thread-safe PVM and (quasi-) thread-safe MPI without active polling. In: Proc. of 9th European PVM/MPI Users’ Group Meeting, September 2002, pp. 296–305 (2002)

    Google Scholar 

  8. Protopopov, B.V., Skjellum, A.: A multithreaded message passing interface (MPI) architecture: Performance and program issues. Journal of Parallel and Distributed Computing 61(4), 449–466 (2001)

    Article  MATH  Google Scholar 

  9. Skjellum, A., Protopopov, B., Hebert, S.: A thread taxonomy for MPI. In: Proc. of the 2nd MPI Developers Conference, June 1996, pp. 50–57 (1996)

    Google Scholar 

  10. Tang, H., Yang, T.: Optimizing threaded MPI execution on SMP clusters. In: Proc. of the 15th ACM International Conference on Supercomputing, June 2001, pp. 381–392 (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gropp, W., Thakur, R. (2006). Issues in Developing a Thread-Safe MPI Implementation. In: Mohr, B., Träff, J.L., Worringen, J., Dongarra, J. (eds) Recent Advances in Parallel Virtual Machine and Message Passing Interface. EuroPVM/MPI 2006. Lecture Notes in Computer Science, vol 4192. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11846802_11

Download citation

  • DOI: https://doi.org/10.1007/11846802_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-39110-4

  • Online ISBN: 978-3-540-39112-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics