Introduction to OpenMP and MPI

This course provides a basic introduction to the two most common approaches to programming and utilising parallel computers, OpenMP and MPI.

Details

Almost all modern computers now have a shared-memory architecture with multiple CPUs connected to the same physical memory, for example multicore laptops or large multi-processor compute servers. The first day of this course covers OpenMP, the industry standard for shared-memory programming, which enables serial programs to be parallelised easily using compiler directives. Users of desktop machines can use OpenMP on its own to improve program performance by running on multiple cores; users of parallel supercomputers can use OpenMP in conjunction with MPI to better exploit the shared-memory capabilities of the compute nodes. The first day of this course covers an introduction to the fundamental concepts of the shared variables model, followed by the syntax and semantics of OpenMP and how it can be used to parallelise real programs.

The message passing programming model (the method primarily used to run applicatinos on the world's largest supercomputers) is essential to understand to effectively utilise ARCHER for most users. The second day of this course uses the de facto standard for message passing, the Message Passing Interface (MPI), to cover all the basic knowledge required to write parallel programs. It covers point-to-point communication, non-blocking operations, derived datatypes, virtual topologies, collective communication and general design issues.

This course is free to all academics.

Intended learning outcomes

On completion of this course students should be able to:

  • Understand shared memory programming.
  • Write, compile, and run OpenMP programs.
  • Understand distributed memory programming.
  • Write, compile, and run MPI programs.

Pre-requisites

There are no pre-requisties for the course, however basic knowledge of C or Fortran programmming would be beneficial.

Timetable

Details are subject to change, but start, end and break times will stay the same.

Day 1: OpenMP

  • 09:30 LECTURE: Introduction to OpenMP.
  • 10.15 PRACTICAL: HelloWorld.
  • 11.00 BREAK.
  • 11.15 LECTURE: Parallel Regions.
  • 12.15 PRACTICAL: Mandelbrot.
  • 13.00 BREAK: Lunch.
  • 14.00 LECTURE: Work Sharing
  • 14.45 PRACTICAL: Image processing.
  • 15.30 BREAK.
  • 16.00 LECTURE: Parallel Loops and synchronisation.
  • 16.40 PRACTICAL: Goldbach
  • 17.30 CLOSE.

Day 2: MPI

  • 09:30 LECTURE: Message-Passing Concepts.
  • 10.00 LECTURE: MPI Programs.
  • 10.30 LECTURE: MPI on ARCHER.
  • 11.00 BREAK.
  • 11.30 PRACTICAL: Hello World.
  • 12.00 LECTURE: Point-to-Point Communications.
  • 12.30 PRACTICAL: Pi.
  • 13.00 BREAK: Lunch.
  • 14.00 LECTURE: Communicators, Tags, and Modes
  • 14.15 PRACTICAL: Ping-pong.
  • 15.00 LECTURE: Collective Communications.
  • 15.30 BREAK.
  • 16.00 PRACTICAL: Message Round a Ring.
  • 17.00 CLOSE.

Registration

Please use the registration page to register for ARCHER courses.

Questions?

If you have any questions please contact the ARCHER Helpdesk.