Last updated: July 1, 2021
 
red bullet point Home
red bullet point Grant
red bullet point Objective
red bullet point Strategy
red bullet point Timeline
red bullet point Project Team
red bullet point Technician
red bullet point Hardware
red bullet point Software
red bullet point Account
red bullet point Teaching Material
red bullet point Course / Lab
red bullet point Research
red bullet point Resource
red bullet point FAQ
red bullet point Vacancy
 
arrow HPCCC Website
 
Total Visitors since
28 Aug 2003: 424820
 
Valid XHTML 1.0!
 
Valid CSS!

Recurring High Performance Computing Course Exercise


EXERCISE 1: Ring Communication
EXERCISE 2: Array Distribution
EXERCISE 3: Parallelize a serial program


EXERCISE 1: Ring Communication

OBJECTIVE:

This exercise is designed for the MPI beginners. It demonstrates how to use the point to point communication to perform a benchmark of ring communication.

DESCRIPTION:

Write a MPI program to perform a ring communication, i.e. P0 -> P1, P1 -> P2, P2 -> P3, ..., Pn-1 -> P0. Perform the communication for 1000 times and print out the total and average time needed.

Top of page


EXERCISE 2: Array Distribution

OBJECTIVE:

This exercise is designed for the beginners of parallel programming. It demonstrates how to distribute data and communicate among multiple processes using point to point communication.

DESCRIPTION:

Download the serial version and rewrite it to meet the requirements using point to point communication. In the parallel version, the root process distributes an equal portion of the array to other processes. Each process (except the root) receives its portion of the array and performs a simple value assignment to each of its elements. Each process then sends its portion of the array back to the master. As the master receives back each portion of the array selected elements are displayed.

Top of page


EXERCISE 3: Parallelize a serial program

OBJECTIVE:

To parallelize a serial program that calculate an integral using collective communication and point to point communication.

PART 1 DESCRIPTION:

You are given a serial program that is used to solve an integral using rectangle rule. The function being calculated is f(x,y)=sin(x)*sin(y). Use the program to finish the following requirements:

  1. Use ONLY MPI Collective Communication to parallelize the 2-D integration problem. Here are the steps you may follow:
    1. Find out which part can be solved concurrently
    2. Decide when communication should takes place between processes
    3. Decide what type of MPI collective communication should be used at each communication step
  2. Output Requirements:
    1. Approx. area found by Rectangle Rule
    2. Execution time of your parallel program
    3. When and how integration is used in your field
    4. Make a table of the speed up and efficiency of your program using 5, 10, 100 processes
  3. Download the source program (C)

PART 2 DESCRIPTION:

You have already designed the parallel algorithm, now turn all your collective communication into point to point. Use ONLY MPI Point to Point Communication to parallelize the 2-D integration problem.

  1. Output Requirements:
    1. Approx. area found by Rectangle Rule
    2. Execution time of your parallel program
    3. Make a table of the speed up and efficiency of your program using 5, 10, 100 processes

Top of page



©2002-2024 Hong Kong Baptist University. All Rights Reserved.