Welcome to the exercises for the MPI tutorial. These exercises will introduce you to the use of MPI routines by having you construct several programs. You should have access to an MPI implementation before you start.

These exercises should be combined with another source of instructional material; they have been designed to accompany a collection of tutorial presentations developed by William Gropp and Ewing Lusk.

Each exercise consists of

Assignment
This describes what your program should do
Output
Sample output that your program should generate
A Solution
A tested solution to the assignment. You should look at this only when your solution is working or you are having trouble.
Comments
This contains some commentary on the assignment and the solution.
In addition, an exercise may also provide
Related exercises
These are variations on the assignment. You should at least read these and look at the solutions and commentary.
Hints
Contains some suggestions if you are having trouble
Profile
A link to a Nupshot data file; this graphically displays the execution of the solution. See Nupshot Setup below.
Finally, all exercises contain links to the MPI standard and an MPI Home Page, which you can use for additional information.

Throughout, references to MPI routines are linked to the MPICH manual pages for MPI.

Getting Started

To dive in, just select First Exercise.
A complete list of exercises is available.
A list of advanced MPI exercises is available.

Caveats

This tutorial is under construction. It requires a browser that supports frames.

Comments are encouraged; please send them to gropp@mcs.anl.gov.

Nupshot Setup

In order to have the MPICH program nupshot process the profile data files, it is necessary to configure your Web browser to process files with extension alog with the nupshot program.

Currently, nupshot is available only for Unix systems. You may be able to use upshot (also distributed with MPICH) on systems that support tcl/tk. This includes Windows, though we haven't tested it. Let us know if you have success running upshot under windows.

Netscape version 2

For Netscape version 2 running under Unix, you can do this by modifying two files.

First, check which files Netscape uses for the MIME configuration. In Netscape, go to "Options", pick "General Preferences", and choose "Helpers". Check your "Personal Types File" and "Personal Mailcap File". To your "Personal Types File", add the lines

# Invoke nupshot on alog files
application/x-nupshot            alog
To your "Personal Mailcap File", add the lines
# Make sure that the path to nupshot is correct
application/x-nupshot; /usr/local/mpi/bin/nupshot %s
You may need to restart Netscape for these to take effect.

Netscape version 3

Go to "Options", pick "General Preferences", and choose "Helpers". Select "New", set the description to application/x-nupshot, the suffix to alog, and the application to "/usr/local/mpi/bin/nupshot %s" (use the correct path, of course).

Other Web Browsers

You'll need to check the documentation for your web browser. The instructions for Netscape version 2 and version 3 should help you determine what your browser needs.