Home | Programme | Registration | Venue | Accommodation | Travel | Gallery | Toronto | SHARCNET | Sheridan | Contact Us

McMaster University
Hamilton, ON

The University of Western Ontario
London, ON

Wilfrid Laurier University
Waterloo, ON

York University
Toronto, ON

University of Waterloo
Waterloo, ON

McMaster University
Hamilton, ON

York University
Toronto, ON

Sheridan Institute
Oakville, ON

What's New

Course materials now available
June 2, 2010

Course materials are now available online. Follow the links on the programme page to see notes and code examples.

Attendees' comments
June 2, 2010

See what other people think and add your comments here

A message to all attendees
May 28, 2010

On Monday, May 31, attendees are to meet at SCAET (S-Wing) atrium at 8:30 a.m. More...

Download the Attendee's Guide.

Subsidized accommodation full
May 27, 2010

The subsidized accommodation for students has been all exhausted. Attendees who need accommodation should make arrangement on their own.

Website recovered from slowness
May 23, 2010

The web site was extremely slow in the past couple of days due to a technical problem with SHARCNET's web server. Those who were unable to register or failed to complete the registration should try again now.

Subsidized accommidation to close
May 13, 2010

Students who wish to apply for subsidized accommodation should now contact the organizers for available spaces BEFORE registration.

Registration online
May 6, 2010

Students who wish to get subsidy on accommodation should register early.

Poster (PDF)

Programming with MPI


In this two-day session, through lectures interspersed with hands-on labs, the students will learn the basics of MPI programming by working towards parallelization of a real, if simple, existing 2d hydrodynamics solver and, if time permits, gravitational N-body solver.

Instructor: Jonathan Dursi, CITA/SciNet, University of Toronto.

Prerequisites: C and/or Fortran scientific programming; experience editing and compiling code in a Linux environment.

Course Outline

Lecture 1, Tuesday Morning: Introduction

  • What is MPI?
  • Hello (Comm_) World
  • MPI Compiler Wrappers
  • What mpirun does
  • What are messages?
  • Send, Receive
  • Deadlock
  • Pairing Sends and Receives
  • Sendrecv
  • Reductions

Hands On 1, Tuesday Morning

  • Parallelizing the 1d diffusion equation

Lecture 2, Tuesday Afternoon: Hydrodynamics

  • Basics of explicit hydrodynamics
  • Communicators; MPI_Cart_create
  • MPI Types

Hands-On 2, Tuesday Afternoon

  • Guardcell filling with Types

Lecture 3, Wednesday Morning: Basic Parallel IO

Hands-On 3, Wednesday Morning

  • Write a single density image to disk using parallel IO

Lecture 4, Wednesday Morning: Nonblocking communiications

  • Overlapping communication with computation
  • Non-blocking: isend, ireceive, iwaitall

Hands-On 4, Wednesday Morning

  • 1D diffusion equation with isend/irecieve/iwaitall

Lecture 5, Wednesday Afternoon

  • Gravitational N-body dynamics
  • MPI Structure Types
  • MPI_Allgather, MPI_Allgatherv

Hands-On 5, Wednesday Afternoon

  • Parallelize N-body code using naive allgather approach or pipeline approach

Course Materials

slides (PDF)
source code (gzipped tar file)