This is the FAQ for CS240A Homework 1. Q00: This FAQ is too long, and I cannot keep track of updates. A00: That is why the questions and answers are numbered. The numbers also make it easy to discuss any issues on the class mailing list. Q01: Which computer should I use for this homework ? A01: Login to cluster2.cs.ucsb.edu. Make sure you have followed the instructions on Machines setup at http://www.cs.ucsb.edu/~cs240a/helpme.html before you start the homework. Q02: How do I get the test harness ? A02: On cluster2: $ cp -a ~viral/hw1 ~ Be careful when you update. Always keep backups of your powermethod.* files. Q03: Does the homework *HAVE* to be in my $HOME/hw1 ? A03: Yes, it is absolutely necessary that your homework be in this directory. Otherwise, you won't be able to run it. Q04: How do I compile ? A04: $ make For compiling only mpi $ make mpi For compiling only upc $ make upc Q05: How do I run ? A05: $ make runmpi $ make runupc Q06: How do I change the problem size or the number of processors ? A06: The defaults are: NODES: 4 PSIZE: 8000 You may change either one or both with command line options to make. For example: $ make runmpi nodes=8 psize=20000 Q07: How do I know if my solution was correct ? A07: In your output, you should have the line: CORRECT: 1 Q08: How is the matrix distributed ? A08: By rows. Elements in a row are in consecutive locations in memory. On each processor, rows start-stop exist. So, if start=5, stop=10, then rows 5, 6, 7, 8 and 9 exist on that processor. Of course, all the columns for that row exist in consecutive locations on the same node. Q09: I just discovered that validate1 has an analytic solution to the problem. What if I just use that instead of doing these silly matvecs ? A09: Yes we know that. In fact, if we find out you have done such a thing, you will have to do 50 situps in every class. The videos will be posted on the class homepage and Google Video for everyone's viewing pleasure. Seriously, this is only to ease your pain. Please do not abuse the infrastructure or argue with the TA about technicalities. Q10: Ok, I will not game the system, but can I use this really cool method to find eigenvalues that I discovered in 3rd grade ? A10: No. You must stick to the algorithm handed out in powermethod.m. The aim of this homework is to learn some basics about MPI and UPC, and get a feeling of performance. Try to optimize your program within the provided framework. But you may demonstrate your brilliance in the final projects. Q11: How many iterations should I do in the power method ? A11: Always do 1000 iterations.