Homework #1
Due: Tuesday, June 27th, 5:30 PM
The tools you will need for this assignment have been installed on the campus linux machines. You may access those machines by clicking here. First, start a job, then download the linux appliance. You should then log in using your WUSTL Key as normal.We are interested in investigating the performance of a vector-matrix multiply operation. An example can be found in the following file: hw1.zip. Everyone must answer the following question:
1.) Compare and contrast the profilers we discussed in class (gprof, oprofile, perf). What are the benefits and disadvantages of each one? Do they agree with each other? If not, why? Feel free to swap out one or two of the profilers for other profiling tools that you know of. Which profilers are better in terms of accuracy? How does the overhead of each profiler affect its results? Which profiler do you prefer?
You must then choose 3 of the following questions:
2.) What can we learn from simple end-to-end timing, or manual insertion of timing hooks? Compare the use of timing hooks with the profilers you examined in question 1.
3.) What can we learn about the cache organization of the machine from this code?
4.) What can we learn about optimization from the compiler (e.g. -O)?
5.) How about pre- versus post- multiplication (i.e. r = vM or r = Mv)?
6.) What is the performance dependance on the size of the matrix or vector?
7.) How does it perform when multiple copies are concurrently executing?
8.) How does it compare to linear algebra libraries (such as BLAS)?
9.) How do the above answers vary accross machines?
You are also encouraged to come up with your own avenues of investigation. You may choose to answer a question of your choosing instead of one of the supplied questions, however it is highly recommended to email the instructor about your idea before doing so.
For each question, be sure to include the following in your report:
- What platform(s) were used? (processor speed, cache size, etc. as relevant)
- How did you go about collecting data?
- What raw data did you collect?
- Analyze the raw data with the appropriate statistical method(s) as discussed in class.
- What did you learn from this investigation? Were your results surprising?
There is no length requirement, but as a general rule of thumb you should write at least one paragraph of text for each chart you include. Usually 3-5 paragraphs is sufficient to answer one these questions, but I will be grading based on content, not length.