Introduction to OpenMP

This is an introduction to using OpenMP for writing parallel programs to run on multi-CPU (SMP) systems, for the purposes of "high-performance computing" (i.e. running programs faster than they can on a single CPU core). It covers all of the principles of OpenMP, and teach the use of all of the basic facilities, so that attendees will be able to write serious programs using it and update most of those that they get from other people. It concentrates on describing how to avoid problems, because shared memory programming and using OpenMP are less about knowing what to do than knowing what not to do. The goal is to learn how to add parallelisation to serial programs fairly simply and easily, and without introducing subtle bugs into the code. It covers Fortran, C and, to some extent, C++.

All examples are given in Fortran 90 and C, and attendees can use whichever of these they prefer for the practicals, or even use the C subset of C++.

Lectures

The first three lectures cover most of the fundamentals of using OpenMP in real programs and programming in SIMD mode - Single Instruction, Multiple Data.

Background and Principles (also in the form of a Handout for the MPhil )

Basics and Simple SIMD (also in the form of a Handout for the MPhil )

More Syntax and SIMD (also in the form of a Handout for the MPhil )

The next two cover slightly more advanced topics, mainly SPMD mode - Single Program, Multiple Data.

Simple SPMD etc. (also in the form of a Handout for the MPhil )

Synchronisation (also in the form of a Handout for the MPhil )

Tasks (also in the form of a Handout for the MPhil )

The next two are confusing but absolutely critical information, needed to avoid serious problems, and some more advanced features that some people may want to use.

Critical Guidelines (also in the form of a Handout for the MPhil )

Intermediate OpenMP (also in the form of a Handout for the MPhil )

Auxiliary Material

Practical exercises

These are practical exercises to use the facilities taught, and are intended to be worked through in order.

Programs and data used in the practicals

These are programs and data used in the exercises. Anyone working through the exercises will need to download them.

Specimen answers to the exercises

These are some specimen answers, which may help if you get stuck with an exercise. All are in Fortran 90 and C.