Shared-Memory Programming with OpenMP

ARCHER, the UK's national supercomputing service, offers training in software development and high-performance computing to scientists and researchers across the UK. As part of our training service we are running a 3 day ARCHER OpenMP course at University of Southampton on 12-14 April 2016.


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. 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.

This is an extended version of Shared-Memory Programming with OpenMP, delivered as part of the CDT programme at Southampton. In addition to covering OpenMP programming, the course will cover optimisation of both single-threaded and multi-threaded code.

This three day course will fall into two parts:

Days 1 and 2 will cover the basics of OpenMP programming, including parallel regions, worksharing, synchronisation and tasks.

Day 3 will cover optimising code for performance, starting with single-threaded considerations and moving on to mutli-threaded issues. All three days of the course will consist of lectures and hands-on practical exercises.

Pre-requisite Programming Languages:

No prior HPC or parallel programming knowledge is assumed, but attendees must already be able to program in C, C++ or Fortran. It is not possible to do the exercises in Java.

Computer access:

All course delegates will need to bring a wireless enabled laptop computer with them on the course. If you have an EduRoam account please ensure this is set up beforehand.

This course is free to all academics.

Intended learning outcomes

On completion of this course students should be able to:

  • Describe the fundamentals of the shared-memory architecture
  • Understand the concepts of threads and shared-memory programming.
  • Write, compile, and run parallel OpenMP programs.
  • Perform basic optimisations for better performance.


Day 1 - Tues 12th April 2016

  • 09:00 Lectures: Shared Memory Concepts; OpenMP Fundamentals; Parallel Regions
  • 11:00 Break
  • 11:30 Exercises: Hello World; Parallel regions
  • 13:00 Lunch
  • 14:00 Lecture: Work sharing
  • 15:30 Break
  • 16:00 Exercise: Parallel loops
  • 17:00 Close

Day 2 - Wed 13th April 2016

  • 09:00 Lectures: Synchronisatio; Further topics
  • 11:00 Break
  • 11:30 Exercises: Synchronisation; Orphaning
  • 13:00 Lunch
  • 14:00 Lectures: OpenMP Tasks
  • 15:30 Break
  • 16:00 Exercise: Tasks
  • 17:00 Close

Day 3 - Thurs 14th April 2016

  • 09:00 Lecture: Computer architecture
  • 11:00 Break
  • 11:30 Lecture: Sequential optimisation techniques
  • 13:00 Lunch
  • 14:00 Lecture: Multithreaded optimisation
  • 15:30 Break
  • 16:00 Exercise: Multithreaded optimisation
  • 17:00 Close

Course Materials

Slides and exercise material for this course.


The course will be held in University of Southampton.


Please use the registration page to register for ARCHER courses.


If you have any questions please contact the ARCHER Helpdesk.