CS475 Fall 2011 - Homework 5

Parallel Program for the Needleman-Wunsch algorithm


Objectives

The objective of this homework is to write an MPI program for the well known Needleman-Wunsch algorithm for global sequence alignment. You should also develop a good understanding of wavefront parallelization using MPI.

Problem Statement

The sequential program for a simplified version of the Needleman-Wunsch algorithm is given here. Note that the problem sizes there are deliberately small for debugging purposes. You should develop a final program that blocks the iteration space into into tiles of height h and width w, where w is floor(N/P) (N is the size of one input sequence and P is the number of threads/procesors) and h is a command line argument. Each processor is responsible for the computation of a column of blocks. A processor should not start calculating a block until the previous processor has given it the data it needs for that block. Processor 0 is exempt to this rule, since it already has the input sequence. You should submit two programs.
  1. Program1 The simple version where the tile height is fixed to 1. Slides 20-23 of the lecture notes cover this case. This is worth half the points on the assignment.
  2. Program2 A generalization for program 1 which accepts the tile height as a command line argument. This requires you to allocate buffers for the communication and to modify the code so that the first (and last) columns in a tile red from (write to) the receive buffer (send buffer). This is worth half the points on the assignment.

Your code should conform to the following:

What/When/How to Submit:

How to Submit:

How to tar files:

Good luck and have fun!