CMSC 714 – High Performance Computing

Fall 2003 - Programming Assignment #2

Due Wednesdays, October 15, 2003 @ 9:00 AM

The purpose of this programming assignment is to gain experience in writing openMP programs.  You will start with a working serial program (swim.f) and add openMP directives to create a parallel program.

HINTS

The goal is be systematic in figuring out how to parallelize this program.  You should start by using the gprof command to figure out what parts of the program take the most time.  From there you should exam the loops in the most important subroutines and figure out how to add openMP directives.

The programs will be run on a Sparc SMP (called tau.umiacs.umd.edu).  Your account names will be the same as on the Linux cluster.

WHAT TO TURN IN

You should submit your program and the times to run it on the input file swim.in (for 1, 4, 8 and 16 processors).

You also must submit a short report about the results (1-2 pages) that explains:

Using  openMP

To compile openMP you use the Fortran90 (/opt/SUNWhpc/bin/mpf90 ) compiler and supply the additional command line argument -xopenmp=parallel.

The environment variable OMP_NUM_THREADS controls the number of processors that will run the program.  Set this value in the shell window you are about to run the program from.

RUNNING THE PROGRAM

Swim reads the input file swim.in from standard input that describes various aspects of how the program should run.

GRADING

The project will be graded as follows:    

Item

Pct

Correctly runs on 1 processor

15 %

Correctly runs on 8 processors

40%

Performance on 1 processor

15%

Speedup of parallel version

20%

Writeup

10%

In addition, extra credit of 5% is available if you complete and turn-in the log for the study.