|
Computing and Information Science 405 |
|
CIS 405 - High Performance Computing: Platforms, Tools, and Effective Strategies for Computationally and Data Intensive Science Spring Semester 2008 — Class Room: Thurston 203 2 Credit Hours Satisfactory/Unsatisfactory 8 weeks TTh from 11:40 to 12:55 Office Hours: By appointment (send email to lifka@cac.cornell.edu) 514A Rhodes Hall Parallel Programming in C with MPI & OpenMP By: Michael J. Quinn Note: I’ve requested a copy of the text be put on reserve at the Carpenter Engineering Library Abstract: An introduction to High Performance Computing, HPC, for graduate students or advanced undergraduate students who will use High Performance Computing as tool in their research. Various HPC architectural platforms will be described with a focus on computational clusters. Students will learn how to identify and exploit the various types of parallelism in algorithms and legacy applications. Understanding how to measure speedup and efficiency and how various bottlenecks affect them will be covered. Parallel programming with MPI, OpenMP, and task-farming techniques such as the use of web services will be covered in detail. The goal of the class is for students to gain practical HPC experience for use in their specific fields of research.
Prerequisites: Proficiency in C, C++, Fortran, or Fortran 90.
Lecture Notes: (Note: Lectures may contain concepts and examples from the Text book and other Sources Listed Below) Week 1: Introduction to High Performance Computing Simple Functional Parallelism example (fp1.c) Simple Task Parallelism example (tp1.c) Simple Pipeline Parallelism example (pp1.c) Simple example of using malloc for a 2 dimensional array (2d.c) Serial 2D Heat Transfer Problem using malloc (heat2d.c) Parallel 2D Heat Transfer Problem using malloc (pheat2d.c) 2D Heat Transfer Movie (heat.wmv) Irfanview — A nice image conversion program
Week 3 & 4: Distributed Memory Programming—Using Message Passing Interface, MPI MPI API example (api_examples.c) MPI All to All example (alltoall.c) MPI Gather examples (gather.c & gather2.c) MPI BagBoy example (BagBoy.c) Serial Bubble Sort example (bubble.c) MPI BagBoy Homework solution (bb2.c) MPI Parallel Bubble Sort solution (pbub.c) Week 6: Parallel Code Debugging, Performance Tuning, & Scalability
Assignments (Note: Scroll Down for the class FAQ) http://www.cac.cornell.edu/documentation/Allocations/Explore.aspx 3. Identify an HPC problem relevant to your area of research. Assignment 2—Due Thursday 2/21 1. Build the RoundTrip.c example using mpicc - Try to understand how this code works - Run RoundTrip.exe in batch using a machines file and 4 development nodes. Run with 4 and 8 processes - Change the number of megabytes sent in the code, rebuild & rerun - Email me the output from 3 different runs of this code 2. Read Chapter 3 in the text book - Pay particular attention to section 3.3 — Foster’s Design Methodology - Review the text examples that apply Foster’s Methodology 3. Read Chapters 4-6 - Pay attention to the various MPI calls and how they are used 4. Design a parallel version of Bubble Sort. - Download serial version (bubble.c) - Apply Foster’s Methodology to this problem - Write and MPI Implementation for your parallel bubble sort - use rand() function to generate a large array of random values to sort - Email: - Describe each of the 4 steps of Foster’s Methodology for your solution - MPI source code for your solution - Batch script for running your program - Output from your batch run 5. Modify BagBoy.c example (BagBoy.c) so that: - each customer is helped in order - once you’ve received all the items for each customer you sort them so that the heaviest - Note: groceries array is in order such that smaller indices are “lighter” than higher indices. - Email: - Source code of your BagBoy solution - Batch script to run your program - Output from your Batch run
Assignment 3 — Due Tuesday 3/25 1. write a serial version of the code “Sieve of Eratosthenes” Use the following algorithm and perl script as a guide 2. Optimized your serial “Sieve of Eratosthenes” code with OpenMP 3. Write an MPI version of the “Sieve of Eratosthenes” - Use MPI_Gather to collect the sub-arrays at the end for the master process to print out.
4. Please fill out Course Survey
Assignment 3 Solutions OpenMP solution MPI solution
[1] Using MPI: Portable Parallel Programming with the Message-Passing Interface By: William Gropp, Ewing Lusk, & Anthony Skjellum
[2] Introduction to Parallel Computing
[3] An Introduction to Parallel Programming
[4] Designing and Building Parallel Programs, Concepts and Tools for Parallel Software Engineering
[5] Introduction to Parallel and Vector Solution of Linear Systems
[6] Parallel Sorting Algorithms
[7] Portable Programs for Parallel Processors
[8] Numerical Analysis, third edition
[9] Applied Numerical Methods with Software
[10] Parallel Programming with MPI
[11] Message Passing Interface Web Site
[12] OpenMP Web Site
|