Lab attendance is your responsibility. Before you leave this and all future labs you must ensure that your name is on one of the check-in sheets. You will no longer be given credit if your name can not be found on one of those sheets.


OpenMP Compilers

See the OpenMP compilers page for a list of supported compilers. Earlier versions of clang do not support OpenMP. If your current compiler does not support OpenMP, you may need to download one that does, e.g., gcc. Make sure that you can compile the sample OpenMP program listed at the bottom of that page.

OpenMP Hacking

Download omp_pi.c. TWO clauses have been removed. But try running it anyway with two threads and n = 1000. Are you getting an approximation for pi that isn’t quite right? See if you can add the missing clauses back without reviewing the slides from yesterday. If not, feel free to peek but try and understand why these clauses are required.

Work on the Project

Use the remainder of this lab period to make progress on your project. You can ask the TAs for help. Good tips:

  • Always do a git pull --rebase before beginning a hacking session.
  • Always do a git pull --rebase before you a git push to make sure you have everyone’s changes.
  • Do git commit in logical “chunks.” For example, after you complete a function.

Note that although I had previously said you should never rebase, in this case it isn’t a bad idea. While git branches are my preferred method of collaboration, I do not believe the size of this project warrants their use.