1
Designing and Building Parallel Programs 2
Outline 3
Message Passing Interface (MPI) 4
What is MPI? 5
Compiling and Linking (in MPICH) 6
Running MPI Programs (in MPICH) 7
Sending/Receiving Messages: Issues 8
What Gets Sent: The Buffer 9
Generalizing the Buffer in MPI 10
Advantages of Datatypes 11
To Whom It Gets Sent: Process Identifiers 12
Generalizing the Process Identifier in MPI 13
How It Is Identified: Message Tags 14
Sample Program using Library 15
Correct Execution 16
Incorrect Execution 17
What Happened? 18
Solution to the Tag Problem 19
MPI Basic Send/Receive 20
Six-Function MPI 21
Simple Fortran Example 22
Simple Fortran Example (2) 23
Simple Fortran Example (3) 24
Advanced Features in MPI 25
Collective Communication 26
Synchronization 27
Data Movement (1) 28
Data Movement (2) 29
Collective Computation Patterns 30
List of Collective Routines 31
Example: Performing a Sum 32
Buffering Issues 33
Avoiding Buffering Costs 34
Combining Blocking and Send Modes 35
Connecting Programs Together 36
Connecting Programs via Intercommunicators 37
Regular (Cartesian) Grids 38
Regular Grid Example: Getting the Decomposition 39
Regular Grid Example: Conclusion 40
Designing MPI Programs 41
Jacobi Iteration: The Problem 42
Jacobi Iteration: MPI Program Design 43
Jacobi Iteration: MPI Program Design 44
Jacobi Iteration: MPI Program 45
Jacobi Iteration: MPI Prog. II
Click outside pointer rectangle to move pointer
Click on Pointer to Hide
Click on Pointer + ALT to toggle message hiding
Click on Pointer + CNTL to abolish pointer
Click on Pointer + Shift to cycle families
Click outside + Alt is Change Image
Click outside + Control is Double Size
Click outside + Shift is Halve Size
Right Mouse Down on Pointer Toggles Index
Shift Right Mouse aligns top with scrolled Page While With Mouse Down on Current Pointer h hides This Message while m restores i Toggles Index Aligned with Page Top j Toggles Index Aligned with Scrolled View Top a Abolishes Pointer while CNTL-Click restores f cycles through pointer families c cycles through members of a family u increases Size Up and d decreases Down Mouse Up-Down between changes of Pointer to process new option