CS240A Homework #3: Frequently Asked Questions
Last Updated:
Mon May 7 15:56:46 PDT 2007
- How do I get started?
Get the harness code for the homework: it includes Makefiles, a generator for
creating the input sparse matrix and a corresponding result validator. You can
copy the harness on DataStar with:
cp -r ~ux454229/CS240A/hw3/ .
This will copy the files in the hw3 directory to your current directory. Please
refer to the README.txt file for further instructions.
- How do I turn in my submission?
Submit your entire homework directory with the report (preferably pdf/ps/html
format) using the turnin script on a CSIL machine as below:
turnin hw3@cs240a your_hw3_directory
NOTE: do a "make clean" in your_hw3_directory first.
If you don't have a CS account, email a zipped copy of your homework directory
and the report to the TA.
- What are the recommended implementation approaches and optimizations?
Avoid storing whole vectors on each thread - each thread should store about
n/p elements of each vector. During the sparse matrix-vector multiply,
sequentially fetch parts of the vector from other threads instead of
fetching it all at once. That way you will just need a O(n/p) size buffer to
hold the vector instead of O(n). For UPC, use UPC_memget() to bulk-copy
shared memory to local memory instead of fetching individual elements directly
from the shared memory.
An optional optimization for the sparse matrix-vector multiply is to get only
those elements of the vector that correspond to non-zero elements in the rows
of A.
- I have a question that is not answered in this FAQ!
Please check if the question has been already answered on the mailing list:
http://groups.google.com/group/UCSB-Computer-Science-240A-Spring-2007
If not, please post your question on the class mailing list:
ucsb-computer-science-240a-spring-2007@googlegroups.com