Introduction Programming Model The MPI Threads API Summary & Conclusions
A Middleware for Concurrent Programming in MPI Applications
Tobias Berka, Helge Hagenauer and Marian Vajterˇ sic September 13, 2011
1 / 26
A Middleware for Concurrent Programming in MPI Applications Tobias - - PowerPoint PPT Presentation
Introduction Programming Model The MPI Threads API Summary & Conclusions A Middleware for Concurrent Programming in MPI Applications Tobias Berka, Helge Hagenauer and Marian Vajter sic September 13, 2011 1 / 26 Introduction
Introduction Programming Model The MPI Threads API Summary & Conclusions
1 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions
1 Introduction
2 Programming Model
3 The MPI Threads API
4 Summary & Conclusions
2 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Emergent Parallel Applications The Need for Concurrency
3 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Emergent Parallel Applications The Need for Concurrency
Multi-core CPUs, High-bandwidth low-latency interconnection networks, Accelerator hardware.
Information retrieval (i.e. search), Online analytical processing, Recommender systems, Data mining.
4 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Emergent Parallel Applications The Need for Concurrency
Add Document Update Document Remove Document Query Documents Data
5 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Emergent Parallel Applications The Need for Concurrency
Add Document Update Document Remove Document Query Documents Data Maintenance Layer Query Layer
6 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Emergent Parallel Applications The Need for Concurrency
Multiple users, Single back-end, Single data base... ⇒ We need concurrency!
At the same time:
Answer queries, Modify the data base,
⇒ We need concurrency!
7 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
8 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
Data structure to describe operations, Queue holds operations, “Main loop” pops operations and processes them.
One activity = one thread.
9 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
+ Efficient,
+ Very tidy abstraction, + Compositional (can always add more threads).
10 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
Data Maintenance Layer Query Layer Add Document Update Document Remove Document Query Documents Maintenance Thread Queue Query Thread Queue
11 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
Encapsulate concurrent activities, Isolate concurrent communication, Unify and simplify the design.
Safety and ease of programmability, Performance.
12 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
P1 P2 P3 P4 C1 C2 T1 T2 T1 T2 T1 T2 T1 T2 13 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
T2
P1 P2 P3 P4 C1 C2 T1 T2 T1 T2 T1 T2 T1 T2 14 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
P1 P2 P3 P4 C1 C2 T1 T2 T1 T2 T1 T2 T1 T2 15 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions Concurrency using Threads Thread Collectives In Actual Use
16 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions The MPIT Interface Definition Constructs and Features Performance Overhead
17 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions The MPIT Interface Definition Constructs and Features Performance Overhead
1According to David A. Wheeler’s “SLOCCount”. 18 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions The MPIT Interface Definition Constructs and Features Performance Overhead
One thread within every MPI process, Separate MPI communicator,
Portable thread interface, We get it “for free” – we have all of the machinery.
Mutex locks, condition variables, semaphores and barriers, Specifies reliable semantics.
19 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions The MPIT Interface Definition Constructs and Features Performance Overhead
Condition variable checks spurious wake-up, Barrier verifies thread identity.
2According to David A. Wheeler’s “SLOCCount”. 20 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions The MPIT Interface Definition Constructs and Features Performance Overhead
21 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions The MPIT Interface Definition Constructs and Features Performance Overhead
22 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions The MPIT Interface Definition Constructs and Features Performance Overhead
23 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions
24 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions
25 / 26
Introduction Programming Model The MPI Threads API Summary & Conclusions
26 / 26