CIS 367: INTRODUCTION TO PARALLEL COMPUTING
Spring 1998
Programming Assignment 3

Due Date: Start of class, Tuesday, March 31, 1998

Objectives

The objective of this assignment is to gain first-hand experience observing some of the problems inherent in parallel programming, and to try out the parallel program performance analysis tool called upshot.

Procedure

  1. Read through chapters 4, 11, and 12.6 of the textbook and Section 5.2 of the Beginner's Guide to MPI on the University of Delaware DEC ALpha Cluster.

  2. You should begin by copying the file integrate.c from the ~ pollock/public directory on porsche. Look at the code. It is version 2 handed out and discussed in class. Note that each process prints its rank and the number of trapezoidal evaluations that it performed as part of the integration. The variation in the number of evaluations performed by each process provides some measure of the load balance.

  3. Compile and run the program 3 times each for 1, 2, 4, 6, and 8 processes. To compile this code, you need to link the math library by adding -lm on the compile command line. To run the code, you need to specify the lower and upper bounds as arguments on the argument line of mpirun after specifying the name of your executable file. You can use 0 and 1 as the lower and upper bounds respectively. Compute the average for each number of processes. Create a single table that contains all of your numbers output from each run. Create a graph that has the number of processors on the horizontal axis, and the number of evaluations performed by each process along the vertical axis. You should graph the 5 averages only on the graph.

  4. Change your parallel program to integrate the function . (You will need to write a function and change the parameter list to the integrate().) Compile and run the same runs as above, gathering the same data, and making the same kind of table and and a separate graph.

  5. Recompile both versions of your integrate program with the -mpilog flag. Now, run each version with 6 processes to create a log file. There should be a filename_profile.log created in your directory after the mpirun. Now, invoke the upshot tool to visualize the profiling information about your runs by invoking upshot with the name of your log file. Warning: This tool wants to create an X window (actually several) on your screen, so you have to have your xterm or PC set up to be able to create Xwindows on your machine from porsche. If you forget how to do this from the first assignment, go back to the MPI manual for UD (setenv and xhost are needed.) In your report below, explain what you see from upshot as described below.

  6. Now, copy your integrate.c program to another file and add logging events and description into the file to gain information about the part of your program that just computes the integration without send's and receives and prints, and then the part of the program that does the result transfer, and finally the part that does the print. So, you have 3 different states for which to log events. (Hint: Look at Section 12.6 of your textbook and the program cpilog.c for examples of how to do this. You need to make sure you include mpe.h in your .c file among other changes.) Compile and run your program as you did above to log events. Run upshot to see the results. Either draw a picture of the upshot screen, or print out the screen to show that you have done this part of the lab.

Experimental Report

Your experimental report should consist of the following sections in this order. It is strongly recommended that you type your report using a word processor rather than handing in a hand-written report.

  1. Cover Page:
    Title, author, course number and semester, date.
  2. Project Summary:
    In one paragraph, summarize the activities of the lab.

  3. Hypothesis:
    First, state and justify your hypothesis. What kind of relationship do you think there should be between the number of evaluations performed by each process and the number of processors for the original function, and then for the new function ? What does this say about load balancing in this program as it is written for different functions? Explain your hypothesis in the context of a large number of processes and a small number of processes.

  4. Analysis:
    1. Collected Timing Data. This section includes both the 2 tables of the raw collected timings (one table for version 1 and one table for version 2 of integrate, both without logging commands), and the 2 graphs depicting the data averages pictorially.

    2. Analysis. In English, explain your timing results. Describe your observations concerning the integration of the original function and then the integration of the second function, and how they compare to your hypothesis. Explain why you believe the timings are different or similar between the integrations. How does it compare to your hypothesis?

      Secondly, describe in one paragraph one possible approach to integration that could improve this code in terms of what you have observed.

    3. Experiences using Upshot. (1) Describe your observations from the use of upshot on your two versions of integrate before adding logging calls. (2) Describe your observations from the use of upshot on your version of integrate after adding logging calls.

  5. Conclusions:
    This section consists of a discussion of what you learned from the various aspects of the lab. Discuss possible reasons for inconsistencies or discrepancies in your data versus what you would have expected to happen.
  6. General Remarks:
    Any comments on the lab itself that you would like to make in terms of suggestions for improvement or problems you experienced.

  7. Appendix:
    1. Your code for the modified version of the integration program.
    2. Your code for the version of integration with logging commands.
    3. Your picture/screen print of the upshot screen after you have added your own logging calls to the integrate program.

About this document ...

This document was generated using the LaTeX2HTML translator Version 95.1 (Fri Jan 20 1995) Copyright © 1993, 1994, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

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

The translation was initiated by Lori Pollock on Mon Mar 16 14:45:47 EST 1998


Lori Pollock
Mon Mar 16 14:45:47 EST 1998