GRID QUESTIONS ============== Q: How do I number my grid cells ? A: The grid cells are numbered top to bottom and left to right. The numbering starts from 0. Q: Does the grid wrap around ? A: Yes the grid is on a 2-D torus. The corner points need to talk to the points on the diagonally opposite corner. Q: Will the inputs be given in any specific order ? A: Yes, the inputs will always be sorted by x as the primary key and y as the secondary key. Q: Do my outputs have to also be in the same order. A: No, the outputs can be in any order. Q: Will the grid always be square ? A: Yes. Q: Will the grid be divisible by the number of processors ? A: Not necessarily ? Q: What are the input/output filenames ? A: life.in and life.out INFRASTRUCTURE QUESTIONS ======================== Q: I can't get updates to the homework ? A: Did you do a checkout on csil ? Quite likely, you only did a checkout (step 3 in the instructions) on the computers you are programming on. Do it on csil also, and then you can get the homework updates we post. Q: I hate typing this *W#$#$@@# password everytime I compile/update. A: Did you setup your ssh keys for password-less access to csil ? Consider this example for the cray: mf.ahpcrc.org. If you don't have .ssh/id_rsa.pub on mf % ssh-keygen -t rsa Then open a second window and login to csil. Copy the contents of ~/.ssh/id_rsa.pub on the cray, and paste them in ~/.ssh/authorized_keys on csil. Repeat this for every computer. You can find plenty of documentation online. IMPLEMENTATION QUESTIONS ======================== Q: How do I get a fast implementation ? A: Try working only on live cells. Make a 2D grid and have a list of live cells. Q: But that takes up too much memory. I want to run a game of life that is much larger. A: Use a sparse representation. You can investigate sparse data structures such as hash tables, range trees, k-d trees etc. You could also use out of core algorithms, and write to the disk. Q: What is a good parallel data distribution ? A: The best one you can use is a 2d block distribution with ghost cells. Work out the communication costs to convince yourself. Q: Should I code for a dense or a sparse game of life ? A: Like in the real world, you need to have something that works well in general, and is asymptotically fast. That said, looking at the rules for game of life, it seems that they tend to make things sparse. 6 out of the 8 cases result in the cell dying...