Homework 2: Frequently Asked Questions (FAQ) Last Updated: 5th April, 2010, 11:14AM Q1. How do I use the harness code? A1. Simply include "hw2harness.h" in your program and add hw2harness.c to your makefile or compile command. On some machines you may have to also link in the math library (using the "-lm" switch to mpicc/gcc). Look in hw2harness.h for the two functions you need to use. There are lengthy comments about what they're for. Q1.1 How do I use the harness if I want to split my matrix in some other way (than by rows) for extra credit? A1.1 When doing your tests for your other data layouts you may write your own generating function. After you finish gathering data set up your program to split by rows and turn it in in that form. Describe the performance of the other methods in your writeup. Q1.2 What vector do I have to pass to cs240_verify? A1.2 The entire vector x. If your program is somehow structured that no single processor has it, then send the whole thing to one processor and call cs240_verify() on that processor. Q2. Do I have to call cs240_verify() only on processor 0? A2. No, but there is no purpose to duplicating the work on every processor. Q3. How do I submit my code? A3. If you have a CS account please use the unix turnin command: $ turnin hw2@cs240a myfile1.c myfile2.c myreport.pdf If you do not have a CS account you may email me (hnielsen@cs.ucsb.edu) a zip file. Q4. How will you build my code? A4. First I will supply my own hw2harness.[c,h]. Then, if you do not supply a makefile I will use "mpicc -lm *.c". If that doesn't work for your code then you must submit a makefile that will compile your code on Triton.