Thread-safety in an MPI implementation: Requirements and analysis

被引:22
作者
Gropp, William [1 ]
Thakur, Rajeev [1 ]
机构
[1] Argonne Natl Lab, Div Math & Comp Sci, Argonne, IL 60439 USA
关键词
message-passing interface (MPI); thread-safety; MPI implementation; multithreaded programming;
D O I
10.1016/j.parco.2007.07.002
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
The MPI-2 Standard has carefully specified the interaction between MPI and user-created threads. The goal of this specification is to allow users to write multithreaded MPI programs while also allowing MPI implementations to deliver high performance. However, a simple reading of the thread-safety specification does not reveal what its implications are for an implementation and what implementers must be aware (and careful) of. 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 does not naturally extend to the multithreaded case and how a naive 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. (C) 2007 Elsevier B.V. All rights reserved.
引用
收藏
页码:595 / 604
页数:10
相关论文
共 14 条
[1]  
[Anonymous], P IASTED C PAR DISTR
[2]  
Buntinas D., 2006, P 6 IEEE ACM INT S C
[3]  
DEMAINE ED, 1997, P 11 INT S HIGH PERF, P153
[4]  
GARCIA F, 1999, LECT NOTES COMPUTER, V1697, P207
[5]  
HOLZMANN GJ, 2003, PRIMER REFERENCE MAN
[6]   The problem with threads [J].
Lee, EA .
COMPUTER, 2006, 39 (05) :33-+
[7]  
*MPI, AN THREAD SAF NEED M
[8]  
PERVEZ S, 2006, COMMUNICATION
[9]  
Plachetka T, 2002, LECT NOTES COMPUT SC, V2474, P296
[10]   A multithreaded message passing interface (MPI) architecture: Performance and program issues [J].
Protopopov, BV ;
Skjellum, A .
JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 2001, 61 (04) :449-466