3 Solved Problems on Parallel Computing - Homework 2 | CS 632, Assignments of Computer Science

Material Type: Assignment; Class: Parallel Computing; Subject: Computer Science; University: University of Alabama - Birmingham; Term: Fall 2006;

Typology: Assignments

Pre 2010

Uploaded on 04/12/2010

koofers-user-i9o
koofers-user-i9o 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Fall 2006 CS 432/632/732 Parallel Computing
Homework-2
10/10/2006 1-2
Individual Work Only. 200 points. Due October 24, 2006.
Design and implement a distributed memory version of the image processing program
implemented in Homework-0 using MPI for message passing.
1. Use two-dimensional data distribution, test the program for different number of processes
shown in table 2, note down the time taken, and complete table below.
Table 2. Time taken (in seconds) with two-dimensional data distribution
Image1 Image2 Image3
No. of
threads Mean Median HP
Filter Mean Median HP
Filter Mean Median HP
Filter
Sequential
1 X 1
2 X 2
3 X 3
3 X 4
4 X 3
4 X 4
4 X 6
4 X 8
6 X 4
6 X 6
6 X 8
8 X 4
8 X 6
8 X 8
2. Using the execution time for image3, develop speedup and efficiency plots for varying
number of processes using two-dimensional data distribution.
3. Compare the execution time between the three different versions of the parallel programs
implemented (Pthreads, OpenMP, and MPI) and explain any difference in execution time
between the two versions.
General Guidelines:
Implement and test these programs on the CIS cluster – Olympus. Follow the instructions for
using Olympus at: http://www.cis.uab.edu/cs632/fall2006/OlympusInstructions.html.
Follow the examples in the MPI Tutorial and execute these examples before working on the
homework.
To minimize the number of job submissions, you could use a single script to submit different
images and different operations. For example you can use the following SGE script for one run:
pf2

Partial preview of the text

Download 3 Solved Problems on Parallel Computing - Homework 2 | CS 632 and more Assignments Computer Science in PDF only on Docsity!

Fall 2006 CS 432/632/732 Parallel Computing Homework-

Individual Work Only. 200 points. Due October 24, 2006.

Design and implement a distributed memory version of the image processing program implemented in Homework-0 using MPI for message passing.

  1. Use two-dimensional data distribution, test the program for different number of processes shown in table 2, note down the time taken, and complete table below.

Table 2. Time taken (in seconds) with two-dimensional data distribution Image1 Image2 Image No. of threads Mean Median HP Filter

Mean Median HP Filter

Mean Median HP Filter Sequential 1 X 1 2 X 2 3 X 3 3 X 4 4 X 3 4 X 4 4 X 6 4 X 8 6 X 4 6 X 6 6 X 8 8 X 4 8 X 6 8 X 8

  1. Using the execution time for image3, develop speedup and efficiency plots for varying number of processes using two-dimensional data distribution.
  2. Compare the execution time between the three different versions of the parallel programs implemented (Pthreads, OpenMP, and MPI) and explain any difference in execution time between the two versions.

General Guidelines:

Implement and test these programs on the CIS cluster – Olympus. Follow the instructions for using Olympus at: http://www.cis.uab.edu/cs632/fall2006/OlympusInstructions.html.

Follow the examples in the MPI Tutorial and execute these examples before working on the homework.

To minimize the number of job submissions, you could use a single script to submit different images and different operations. For example you can use the following SGE script for one run:

Fall 2006 CS 432/632/732 Parallel Computing Homework-

#!/bin/bash

#$ -cwd #$ -j y #$ -S /bin/bash

#$ -pe mpi 12 MPIRUN=/usr/local/topspin/mpi/mpich/bin/mpirun_ssh EXECUTABLE="./mpi_image image1 mean 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image2 mean 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image3 mean 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image1 median 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image2 median 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image3 median 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image1 hpfilter 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image2 hpfilter 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE EXECUTABLE="./mpi_image image3 hpfilter 3 4" $MPIRUN -np $NSLOTS -machinefile $TMPDIR/machines $EXECUTABLE

Submission: Email the source code along with any scripts/Makefile and typed answers to the above questions (Text, Word, PDF file) as a single tar/zip file attachment to [email protected] with the subject “CS432/632-Homework2.”

Resources:

  1. Programs from previous semester and input files for testing are available at: http://www.cis.uab.edu/cs432/software/index.html.
  2. MPI Tutorial Slides: http://www.cis.uab.edu/cs632/fall2006/MPITutorial.pdf.
  3. Instructions for accessing Olympus and using the batch system can be found at: http://www.cis.uab.edu/cs632/fall2006/OlympusInstructions.html.