Login to Abe, run the A0 example described in the the Brief Guide to Abe and email the job output file to
| pcicotti | +160_abe | @ | ucsd. |
edu |
| Date | Description |
| 29-Oct-08 | Original posting |
| 06-Nov-08 | Correct the name of the threads argument to be -nthreads, which is consistent with A3. |
In this assignment you'll run your pthreads implementation of the Game of Life on Abe, make some performance enhancements, and carry out a set of experiments to assess the performance of your implementation.
Copy your code over to Abe, and construct a Makefile using what is provided in $(PUB)/A0. Comment out the plotting code, as it will interfere with your performance measurements (If you like, add a command line option to disable the plotting code, and post your questions to the web board.) Run the code on 1, 2, 4, and 8 threads for a fixed size problem. Plot the speedup curve that corresponds to your data (and be sure to include any plotted data in tabular form). Do you notice any trends? What is causing the effect you observe?
Choose a world size (N) such that when you run for 100 iterations, your code will complete in about 30 seconds on 1 processor. have done this, determine the minimum value of N required to obtain a linear speedup when going from 1 to 8 processors. Try optimizing your code in order to reduce this minimum value of N. Do you notice any trends?
To measure performance, use the timer code that was provided in the previous assignment. Be careful not to time initialization, output, nor code that is used to verify correctness (why is this?). If you timed your code in the previous assignment, move the timer outside the outer iteration loop; this may lead to more accurate timings, especially for smaller N.
Time at least 3 runs and taken the minimum time for each combination of N and processor geometry. Be sure to use the same random seed using the -s flag, so that your input will be the same. (If you like use the following alternative method. Repeat each set of 3 runs for different random seeds, and then take the average of the minimum timing taken from each set of three.)
Next, implement two dimensional processor geometries.
To support this capability, you’ll need to modify the -t
-nthreads
argument to accept 2 integers rather than one. Thus,
for a 2×2 geometry, you will specify -t 2 2
-nthreads 2 2
and so on.
With this capability in hand, determine the optimal geometry
for 4 and 8 threads.
As before,
determine the minimum value of N
required to obtain a linear speedup when going from 1 to 8 processors.
In the course of debugging your code, you may find it handy to generate output, as in the previous assignment.
Document your work in a well-written report which discusses your findings carefully. Your report should present a clear evaluation of the design of your code, including any bottlenecks in the implementation. Describe any special coding or tuned parameters. Be sure to answer all questions highlighted in boldface above. Provide pseudo-code listings for code you wrote. There is no need to provide pseudo-code for the provided unblocked matrix multiply code.
Provide all data you plotted in tabular form. This can exist as an appendix in your report.
Your report should cite any written works or software as appropriate in the text of the report. Citations should include any software you used that was written by someone else, or that was written by you for purposes other than this class.
As in the second assignment, run a suite of commands to identify the hardware and the environment you used to develop and run your code.
Place all output from these commands in a file called config.out, e.g. by using the script command. Also report on the hardware characteristics of the processor, that is, TLB,and the caches, by examining the on-line documentation, and any web pages you encounter in the process (in that case, provide the URL).
As in the previous assignments, your turnin will consist of two parts. Turn in a hard copy of your report in class on Thursday 11/13. Transmit your report electronically by that time as well. Email a single archive file, e.g. .zip, .tgz, containing your writeup and source code. Be sure and delete all .o files and executables before creating the tar file. Email the archive file as an attachment to the following address:
| pcicotti | +160_a4 | @ | ucsd. |
edu |
Be sure to put the string cse160:A4 in the subject line and to use the email address above; not doing so may result in a penalty.
The name of your archive file should start with your login ID, e.g. baden.tgz. When your archive file is extracted, a new directory should be created with the name of your login ID. The directory should contain two subdirectories
| src: | All source code including your makefile, so we can build the software. |
| report | Your report including any image files, screen shots, or other output you wish us to see. Also put the config.out file in this subdirectory. |
At the top level of your directory there should be an ASCII file called README.txt, listing all the parts of your electronic submission. If you like, include a .html file called index.html at the top level. From there you can then link to a README file as well as the src and report directories.
| Maintained by | baden | @ | ucsd. |
edu | [ Thu Nov 6 22:37:46 PST 2008] |