Each of these type of programs have the following files associated with them:
These files can be found in the following directories:
Exercises Simple Array Assignment
There are serial, MPL, MPI, PVM3 and LINDA versions of this code.
Exercises Matrix Multiply
In the parallel version, the data is distributed among the worker tasks who perform the actual multiplication and send back their respective results to the master task.
Note that the C and FORTRAN versions of this code differ because of the way arrays are stored/passed. C arrays are row-major order but FORTRAN arrays are column-major order.
Exercises pi Calculation
There are serial, MPL, MPI, PVM3 and LINDA versions of this program. The MPL and MPI version has two variations, one which demonstrates point-to-point communications (mpl_pi_send) and one that demonstrates collective communications (mpl_pi_reduce).
SERIAL FILES:
MPL FILES:
Exercises Concurrent Wave Equation
A vibrating string is decomposed into points. In the parallel version, each processor is responsible for updating the amplitude of a number of points over time. At each iteration, each processor exchanges boundary points with their nearest neighbors.
An X based display of the final wave is provided for the parallel versions of this code.
There are serial, MPL, MPI, PVM3 and LINDA versions of this program.
SERIAL FILES:
MPL FILES:
MPI FILES:
Exercises 2D Heat Equation
There are serial, MPL, MPI, PVM3 and LINDA versions of this program. The PVM and MPL versions provide an X based display of the initial and final temperature distributions.
This sections contains some advanced examples. Only the parallelized code is available and usually in only one language and one parallel tool. Currently, it contains some image processing examples using X-Windows.Other Examples
Other Examples Image Rotation
A single processor reads the input image from disk and broadcasts to all the other processors in the system. Each processor allocates space for a contiguous swath of rows in the output image. Processors then calculate the coordinates of the source input image pixel for each pixel in this output image swath. Individual swaths of the output image are then collected at the destination processor. The destination processor then displays the image on the local X server.
Note: When running this program make sure that your DISPLAY environment variable is set and that the MP_PROCS environment variable is set to 4.
MPL FILES:
MPI FILES:
Other Examples Mandelbrot Image and Display
Each processor calculates the image pixels for a swath of rows in the output image. These swaths of rows are then collected at a single processor and displayed on the screen.
MPL FILES:
MPI FILES:
Other Examples Timing Example
A set number of messages are sent between the master and worker tasks. Before and after timings are made for each message and an average is calculated when completed.
MPL FILES:
MPI FILES:
PVM3 FILES:"Message Passing Libraries on the SP1" Presentation materials from the Cornell Theory Center, Ithaca, New York
Man Pages - on the SP1. Use the C Language name for the routine if looking for the FORTRAN version.
We gratefully acknowledge David Turner of Scientific Computing Associates for the serial and linda versions of the Heat2D exercises and the Cornell Theory Center, Ithaca, New York for the use of their "Template Codes for the SP1".
Documents located on the Maui High Performance Computing Center's WWW server are copyrighted by the MHPCC. Educational institutions are encouraged to reproduce and distribute these materials for educational use as long as credit and notification are provided. Please retain this copyright notice and include this statement with any copies that you make. Also, the MHPCC requests that you send notification of their use to help@mail.mhpcc.edu.
Commercial use of these materials is prohibited without prior written permission.
Last revised: 5/17/95 George Gusciora