CM30225 Parallel Computing

Revision Classes

There will be revision classes in the usual time slots this week

The Unit

Unit Catalogue

Some texts

Parallel computing has been around for longer than you think, so there are many books -- just pick one! None I have found matches this course terribly well, but each contains useful bits and pieces. At least for the generalities.




Some links

Wikipedia seems fairly accurate in this area, but you should always treat Wikipedia as a useful source of pointers and follow up the references

Using Balena

Notes on using Balena.

Your jobs will go into the "cm30225" queue: this is shared by all of you on this unit

If you submit a large number of jobs your priority will decrease to give other people's jobs a chance

Expect the queue to get longer as you approach the hand-in date!

Programming in C

Some quick notes to remind you about programming in C

The Coursework

Coursework accounts for 25% of the unit total. It consists of two assignments:

If you have problems accessing Balena, please email and give as much detail as you can about the problem. Note this is purely for problems with the machine: any other problems are your own!

There are plenty of resources on available on the Web to help you with both assignments, including standards, manuals and tutorials.

Coursework FAQ

This coursework is designed to investigate parallelism, not mathematics. So if you are focusing on the mathematical aspects, you are just making extra work for yourself

Q I've read about relaxation and it seems very hard. What should I do?
A Read the specification again, particularly the bit about how this is purely about repeatedly averaging four numbers
Q Can I use C99 features in my code?
A Yes, as long as it compiles and runs on Balena, and you document the fact (also see FAQ below)
Q What does "precision" mean?
A This is the accuracy you require from the final result. Keep iterating until all new values differ from their old values by less than the precision. The choice of values for the precision is for you to determine.
Q I am developing my code on an Apple and it complains about various things not being defined. What is going wrong?
A You are developing your code on an Apple, which does not implement all of POSIX pthreads. Try using Balena
Q I am developing my code on Balena and it complains about various things not being defined. What is going wrong?
A You are likely using -std=c99 which is overly fussy about optional features. Try -std=gnu99 . And remember to link with -lpthread
Q I update a value (by the average of its four neighbours), then I update one of the neighbours: do I use the old value or the new averaged value for the second update?
A Either: it's your choice. In the long run, on large matrices, they will both converge to the same result, but you need to think about other consequences of your choice
Q How do I make the starting array? Should I read it from a file?
A This is fine. Or just generate the array within the program
Q What does "correctness testing" mean?
A Testing to show that the final values produced by your program are correct, as you would expect from a correctly working solution
Q My program works for small matrices, but crashes when I try large matrices.
A You are likely allocating your array(s) on the stack, which is of limited size. Use malloc to allocate them.

The Exam

At the end of the semester (75%).

Online Past Papers

Past papers

Also, here is a mock exam.


Not much on Moodle


All the slides in one big PDF. The exam will only be set on material covered in lectures and your lecture notes will tell you what was covered in lectures.


These will be released after the relevant lecture: there is no substitute to having the material go through your brain at least once!

Note that these slides are hints to me as to what topics I should cover: they don't contain everything I shall say in lectures. You should come to lectures, take notes in lectures and read books.

The file numbers don't correspond to anything in particular in terms of lectures or subject covered. I may have skipped some material in lectures: why not improve your general education and read the extra too! The exam will only be set on material covered in lectures and your lecture notes will tell you what was covered in lectures.

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29