next up previous


CISC 879/PHYS 838: PARALLELIZATION FOR SCIENTIFIC APPLICATIONS
Fall 2000
MPI Programming Assignment 1
Due Date: start of class, September 7, 2000

Objectives

The objective of this assignment is to write some simple MPI programs to learn how to accomplish communication between processes, and to time MPI programs.

Tasks

1.
Read through Section 3 of the Beginner's Guide to MPI on the University of Delaware DEC Alpha Cluster, and a tutorial or alternative MPI resource.

2.
Implementation of Collective Communication: In order to avoid some of the problems that may occur with I/O on a cluster, you might want to have one process in charge of the actual I/0, and then have that process send out the data to the appropriate processes as needed, and receive data from other processes as needed to be output.

Task 1: Write a function gather_em_up that uses MPI point-to-point communication to implement a gather of a vector that has been distributed over the various processes in block style. A program should be able to call gather_em_up to send a vector of some size (specified as a parameter to gather_em_up) of integers from each process to process 0, which serves as the I/O process. When gather_em_up returns, process 0 should have a vector that contains all the vectors of the various processes as a single vector, similar to how the MPI_Gather routine works. Your goal should be to make this gather operation as efficient as possible, avoiding unnecessary sequentiality as much as possible.

Task 2: Write an MPI main program that has process 0 input the size to be used as the local vector size for each process, has each process (including process 0) allocate a vector of that size and initialize their local vector in some deterministic and easily identified way (to make checking correctness easy), and then all processes call the gather_em_up function and process 0 print out the final gathered vector.

3.
Gathering performance data. Add timing statements into your program to time the whole program, starting just after the MPI_Init and just before the MPI_Finalize. Compile and run your program with local vector sizes of 10, 100, 1000, 10000, each with 1, 4, and 8 processes. Script the runs as specified in the next bullet.
4.
What to hand in.

Hints for Getting Good Timing Data

In order to get reliable timing data, you need to make sure that no one else is using the cluster. On the DEC alpha cluster, you should run the spyall command just prior to making a performance run. Also, from past experience, leaving the timings until the last evening before the assignment due date makes getting reliable timing runs very difficult to obtain due to the many other folks trying to get access to the cluster for timings.




Please staple all parts of your lab together, and label each piece.

Criteria for Evaluation

Your lab will be evaluated according to the following criteria:

1.
10 pts: correctness of main program
2.
10 pts: correctness of gather_em_up routine
3.
5 pts: Generality of program and routine
4.
5 pts: Efficiency of gather_em_up routine
5.
5 pts: Timings of performance runs for vectors of size 10, 100, 1000, 10000 for 1, 4, and 8 processes
6.
5 pts: Written discussion of results

About this document ...

This document was generated using the LaTeX2HTML translator Version 98.1p1 release (March 2nd, 1998)

Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html -split 0 mpilab1.tex.

The translation was initiated by Lori Pollock on 2000-09-06


next up previous
Lori Pollock
2000-09-06