Programming of Parallel Computers/Lecture 3
From PBDN
This content is a student-produced work-in-progress and may be incomplete or contain errors.
You can help by adding new material, links, or by correcting errors.
A wiki is a collaborative resource. The idea here is that a valuable communal resource can be created if many of us contribute to it, not that one student should create a resource for your benefit. If you don't think that you can make a direct positive contribution right now, that's OK, but at least register an account to signify that you are willing to help.
Contents |
Summary
A brief discussion of parallel programming models, followed by an introduction to some detail of MPI.
Parallel Programming Models
To be added.
MPI (Message Passing Interface)
Notes
Scans of MPI notes and slides are now online.
The scanning was done from two-up (i.e. reduced so two pages fit on one page) photocopies provided by Jarmo.
Scans have been split into "natural pages", rotated if necessary, and cropped to content. These are available:
- In an online image browser
- As a PDF document (screen viewing, 4.2MB)
These images are best viewed at 1:1 scaling. If your browser automatically shrinks the images to fit the browser window, some pages may not be legible. Resize the browser window or use Firefox.
Complete sets of scans (150ppi grayscale), directly as they came from the scanner software (i.e. not split, rotated, or cropped), are also available (better for printing out):
- As a zip archive of PNGs (scans, 5.8MB)
- As a PDF document (scans, printing, 5.4MB)
Overview
MPI appeared in 1994. The MPI Forum define and maintain the MPI standards.
The MPI standard is cumulative in the sense that the MPI 2.0 documents extensions (and some clarifications) to MPI 1.1, so the appearance of 'mpi-11 in the URLs below, referring to MPI 1.1 does not mean that the links are out-of-date. Although C++ and Fortran bindings are defined, C function names are used below.
MPI is a standard specification of functionality and interfaces, not an implementation. A number of implementations are available including (free):
Open MPI is installed on duma and simba.
On duma and simba, the MPI implementation is Sun MPI 6.0 (part of the Sun HPC package), which supports MPI 2.0. Documentation can be found under /opt/SUNWhpc/doc/.
Basic MPI Programming
Basic Functions
There are over 100 MPI calls, but 6 basic calls:
Initialisation and Setup
Communications
Cleanup
Messages
To be added
Point-to-Point Communication
Standard (blocking) mode calls:
Their non-blocking equivalents are prefixed with "I" (all of the links below are to the same page of the standard, which deals with all of them):
- MPI_ISend
- MPI_ISsend (synchronous)
- MPI_IRsend (ready)
- MPI_IBsend (buffered)
- MPI_IRecv
With non-blocking communication, it is necessary to test whether a communication is complete one or more calls to one of the following:
Continued in Lecture 4.