HOMEWORK 2 FAQ (THU Sep 20, 0850 HOURS) ERRATA ------ 6e) "... the time to get sixteen integers from memory is T2" should read: "... the time to get eight integers from memory is T2" i.e., one cache line Problem 1 --------- Problem 2 --------- Problem 3 --------- Problem 4 --------- Problem 5 --------- Problem 6 --------- Q6-1) Should we be considering the time it takes to write back from the cache to memory when calculating the EMAT? A6-1) Yes. Do you know how that changes things ... assuming very large N and K? Q6-2) In part e, the question mentions T2 which is the time to get 16 integers from memory. However, cache lines only hold 32 bytes (8 integers). Are we to assume here that we read two cache lines in the time T2? A6-2) That is a misprint. T2 is the time to get 8 integers. Problem 7 --------- Q7-1) I am getting the following error when I run membench on my laptop: gnuplot generic.gp > generic.ps "generic.gp", line 4: undefined variable: linetype What do I do? A7-1) Approach 1: The "undefined variable: linetype" errors that people are getting are probably due to recent syntax changes in gnuplot. When I tried running gnuplot interactively and typing the command "set linestyle 1 linetype 2", I received the following error: > Warning: deprecated syntax, use "set style line" Changing the 3 linestyle lines in generic.gp to the following seemed to help: set style line 1 lt 2 set style line 2 lt 3 set style line 3 lt 1 Modifying these 3 lines in gnuplot.template is a better solution, and allows 'make generic.gp' to give a working gnuplot file. I am using gnuplot 4.0. I'm not sure which version of gnuplot introduced this syntax. Approach 2: Comment out the following 3 lines in the generic.gp file (i.e., put a '#' in front of the lines): set linestyle 1 linetype 2 set linestyle 2 linetype 3 set linestyle 3 linetype 1 i.e., it should look like: #set linestyle 1 linetype 2 #set linestyle 2 linetype 3 #set linestyle 3 linetype 1 This seems to work on hive.cec. Then, enter: make generic.ps to finish the run; i.e., the generic.out file containing the raw data is probably ok and you just need to produce the PS file. [ Aside ] The real fix may be to comment out those three lines in the gnuplot.template file, but I am not sure what the real problem is at the moment. Q7-2) I seem to get a pretty undecipherable graph. It has around 12-13 lines on it all unlabeled and with no index. Am I supposed to be able to infer the cache size that corresponds to a specific line? A7-2) Yes, there is no legend. But if you look at the output data file (probably generic.out), you will see the raw data and you can tell which one is which. Problem 8 --------- Q8-1) In problem 8 part B...It says "provide output and a table showing the time it took to do the three operations to call the stub function from the three runs." To clarify, does that mean to include each of the three operations on the table or only the stub function? A8-1) All operations. It should look like: N Run 1 (units?) 2 (units?) 3 (units?) Function Call (stub): 10 X X X 100 X X X 1000 X X X 10000 X X X System Call (gettimeofday): 10 X X X 100 X X X 1000 X X X 10000 X X X Fork Call: 10 X X X 100 X X X 1000 X X X 10000 X X X Problem 9 ---------