Computer Science 341-02
Parallel Processing

Mount Holyoke College
Fall 2007


Assignment 1: Introduction to Parallel Programming and the MHC Cluster
Due: 9:00 AM, Thursday, September 13, 2007


As with all of our weekly assignments, this document tells you what you will need to read, write, code, and otherwise prepare for the next week's lab and discussion meetings. It includes some work (in the "Lab Tasks" section) that should be submitted by the deadline in the header. Readings and other preparation for our meetings must be done before the actual meetings. In each meeting, I will have some points I will be sure we discuss, but you are encouraged to come with questions and ideas for discussion as well.

Readings

Be prepared to discuss the readings from the Quinn text and the notes on this handout during our meeting on September 13. In particular, we will discuss some of the questions in this section during the meeting.

Read Quinn Chapter 1.

Why Parallel Computing?

Let's consider a few "real world" examples:

In each of these cases, we have taken what we might normally think of as a sequential process, and taken advantage of the availability of concurrent processing to make use of multiple workers (processing units).

Parallelism adds complexity (as we will see in great detail), so why bother?

Some Basics

Sequential Program: sequence of actions that produce a result

(statements + variables), called a process, task, or thread (of control). The state of the program is determined by the code, data, and a single program counter.

Concurrent Program: two or more processes that work together.

Big difference: multiple program counters.

To cooperate, the processes need communication and synchronization, which can be achieved through shared variables, or message passing.

Hardware to run concurrent processes:

Computers may be classified as:

Some examples:

See http://www.top500.org/.

How to Achieve Parallelism Lab Tasks

Instead of a class meeting on Tuesday, September 11, we will meet in my office (Clapp 220) and proceed to a computer lab to work on these lab tasks.

There are several files to turn in for this assignment, due at 9:00 AM, Thursday, September 13, 2007. They should all be included in a file named assignment01.tar that will extract into a directory assignment01 that contains files as specified below. You will submit assignment01.tar by e-mail as an attachment. Please use the filenames specified and be sure to include your name in each file. Please ask if you have any questions about creating the tar file or attaching it to an e-mail.

  1. Log into and familiarize yourself with your MHC Cluster account. When you are ready to do this, I will provide you with a username and an initial password.
    1. First, make sure you can log into the head node, accessible as mhccluster.teresco.org.
    2. Create a directory in your account for work from this class. Change the permissions on the directory so only the only operations permitted are reading and writing by you.
    3. Log into the main Solaris cluster node (login node: bullpen).
    4. Log into a FreeBSD cluster node (login node: joba).
  2. Read the web page for the MHC cluster here. Don't worry if some of the terminology is not yet familiar.
  3. Copy the C program here that computes the late penalties for this course to your MHC cluster account. Compile and run it, redirecting your output to a file late.txt. Include this file in the tar file that you submit when you are finished. (1 point)
  4. Copy the file /cluster/home/terescoj/shared/make-example.tar to your directory. It is a "tar file" of a small C program that demonstrates the use of multiple source files and Makefiles. Extract the files (tar xvf make-example.tar) and compile the program with make. Breifly describe in a plain text file assignment01.txt how make uses the rules in the Makefile to produce the executable main. (1 point)
  5. The MHC cluster web page includes a simple parallel program called mpihello.c.

Remember, your tar file should be named assignment01.tar, and when extracted should create a directory assignment01 that contains the files you wish to submit.