Homework/Lab 1
Introduction to (or Review of) C and Unix
and the Bullpen Cluster
due Monday, February 10, 2003, 11:59 PM
There are several files to turn in for this assignment. They should
all be included in a file named hw01.tar that you submit using
the turnin utility. 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 using the turnin utility.
- Send me mail at terescoj@cs.williams.edu with a brief (a
couple sentences) description of your level of experience with the
Unix operating system and its variants. Also include list programming
languages you have used and your proficiency in each, any experience
you've had with parallel programming, and anything else you'd like me
to know about your background. (0 points)
- Log into and familiarize yourself with your CSLab Unix account.
Forward your CSLab electronic mail to an address you read regularly,
as I will often use your @cs.williams.edu address. Try FreeBSD
systems in the lab (epirus, hinterwald, toto, pester, zebu,
faeroes, dulong, bearnaise, pineywoods, basuto, baggerbont, watusi)
and the Solaris cluster (bullpen). Create a directory in your
account for work from this class. Change the permissions on the
directory so only you have read or write access to it. (0 points)
- Read the web page for the Bullpen cluster here.
Don't worry if some of the terminology is not yet familiar. (0
points)
- Copy the C program here that computes the late
penalties for this course to your CSLab Unix 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)
- In a plain text file hw01.txt, name an application you use
that you think could benefit from parallel processing. Describe how
you think it could be parallelized and what benefit parallelization
might provide. (1 point)
- Copy this file to your CSLab Unix account,
either from this link, or from /home/faculty/terescoj/shared/cs338/hw01/make-example.tar. 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 your plain text file hw01.txt how make
uses the rules in the Makefile to produce the executable main. (1 point)
- The Bullpen web page includes a simple parallel program called
mpihello.c.
- Copy mpihello.c to your account.
- Create a Makefile that builds an executable called
mpihello when you type make or gmake. Be sure
to create a 64-bit MPICH executable.
- Run the program with two processes interactively on bullpen and redirect the output to a file mpihello.out.
- Run the program three ways through the PBS batch system:
- Include the files mpihello.c, Makefile, mpihello.out, twoonone.pbs, twoonone.out, fouronfour.pbs, fouronfour.out, all24.pbs, and all24.out in your submitted tar
file. Do not include any ".o" files or the mpihello
executable. (2 points)