[Note: this webpage last modified Thursday, 07-Feb-2013 08:30:27 EST]

First Exam

Topics. Everything we have done so far. This includes OpenMP, MPI, Posix threads (pthreads), and the basic concepts of syncrhonization. You should be "experts" on the factoring, perfect number, and merge sort algorithms we have done so far - be able to reproduce the simpler ones, be able to fix bugs, make modifications, etc.

Format. There will some on-paper questions and some on-computer questions. The on paper questions will be standard exam-type questions. The on-computer questions will be to write some code.

Example questions. Here are some of the types of questions that may be on the exam...

  1. On computer. Give code. Create code for a parallel algorithm to do BLANK. Examples include: factor by trial division, add up the first n primes, find the smallest in a list of numbers, sort a list of numbers (or reverse sort), ... For each, I could ask you to do it using OpenMP, pthreads, or MPI.

  2. On computer. Fix mistakes. If I give you a program that has some logical error in it, you should be able to fix it. For example, if there is no locking of updates to shared variables, you should be able to put in the correct instructions for locking the updates.

  3. On paper. What does code do. For a given piece of code on paper, you should be able to determine what the code does. If there is more than one possible output value (e.g., because locking is not done appropriately) you should be able to list them all.

  4. On paper. Running time/design. For a given algorithm or piece of code, you should be able to analyze the running time and suggest improvements if there are problems. For example, if updates to shared variables are going to essentially make the program run sequentially, you should be able to identify that and to suggest a way to fix it.

Software Environment/Installation/Login

Installing C.   Either just use gcc by logging into the CS server using putty and your cs account, or install a C compiler on your computer. If you use Linux or Mac, it is likely installed already. If you use Windows, you can install Cygwin.

It is absolutely required that you have access to a working computer with C installed (or a computer with Putty installed and an internet connection) that you have access to outside of class time. The biggest factor in your success in the course is how much time you spend programming outside of class.

Installing Putty and FileZilla.   To install the FileZilla ftp client, go to FileZilla. To work on your assignments on the CS server, you must install Putty if you are using Windows. If you are using Linux or Mac, you can just use ssh from the terminal/shell.

Login to CS server.   You will turn your assignments in by leaving them on the Computer Science server. I have administrator access to this server and can easily grade your homeworks once they are on the server. Create a directory in your account called cs670, and create a directory within that called handin. Make sure to use all lower case for both. You will leave your completed C programs in your cs670/handin/ directory.

Emacs If you are programming by logging into the CS server or using Cygwin to edit your files, you have some choice about what text editor to use. Those installed on the CS server include: vi, pico, nano, emacs. If you want to use a strictly Windows text editor, you might try Notepad++. I use emacs because it does auto-indenting and other things. If you decide to use emacs, you'll need to learn the shortcuts for things. The ones I use most are the following (search online for others).

Homework Assignments

The homework assignments are posted in the in class code. hw1.c contains the first homework assignment, hw2.c is the second homework assignment, etc. I will announce in class and/or by email when a new assignment has been posted. Each homework assignment will list the date the assignment is due. Late assignments will not receive any credit; I will grade them just so you know how you did.

To complete a homework assignment, (1) download the assignment from the in class code, (2) make changes to the file provided to complete the assignement, (3) upload your completed assignment to the CS server before the due date. OR, log into CS with putty/ssh, copy the assignment to your own directory, make changes to complete the assignment, and copy it into your handin directory. To download the file, you should browse to the in class code on the course website, right-click, and choose "Save as" or "Save target as" (depending on your browser) to save the file to your computer. DO NOT copy/paste into a word document, or send an email with your assignment. DO NOT change the name of the homework file - keep the name exactly the same as on the class website.

For each hw assignment, I will post a Tegrity video where I describe the hw assignment and show how my correct solution works. You will need to watch this video on your own time. The reason I do this is to FORCE you to spend some time outside of class looking at the homeworks.