An introduction to shared memory parallel programming using OpenMP, 28 February - 3 March, 2022

An introduction to shared memory parallel programming using OpenMP

OpenMP provides an efficient method to write parallel programs in C, C++ and Fortran. OpenMP programs are suitable for execution on shared memory architectures such as modern multi core systems or a single compute node of the HPC clusters deployed by Lunarc or HPC2N, and within SNIC.

This online course will introduce participants to the shared-memory model for parallel programming and the OpenMP application-programming interface. In many cases OpenMP allows an existing serial program to be upgraded incrementally, starting with the parallelisation of the most time-consuming parts of the code. Typically OpenMP programs are easily ported from one shared memory multi processor system to another one.

The course consists of lectures alternating with practical sessions. The teaching language will be English. No prior experience in parallel computing is required. Participants are however expected to be able to write serial programs in C, C++ or Fortran. The course contents includes:

  • Shared memory programming concepts
  • Syntax of the OpenMP API
  • Parallel and serial regions
  • Shared and private data
  • Workshare constructs and scheduling
  • Reductions
  • Avoiding data access conflicts and race conditions
  • Performance considerations for non-uniform memory access hardware (e.g. nodes of SNIC HPC clusters)
  • Introduction to OpenMP tasks

At the end of the course participants should have the ability to parallelise many of the computational kernels used in scientific codes.

Eligibility

The course is open to users and prospective users from all six SNIC HPC centres. It is part of the SNIC coordinated training in HPC.

Pre-requisites

Participants should be able to program in either of C, C++ or Fortran at an intermediate level.

The instructors

The course will be taught by consultants from HPC2N and LUNARC.

Time and location

The course will be online. Course times are as follows:

  • 28 February 2022, 09:00-12:30
  • 1 March 2022, 09:00-12:30
  • 2 March 2022, 09:00-12:30
  • 3 March 2022, 09:00-12:30

Course project: As part of the hands-on, you will be given temporary access to a course project, which will be used for running the hands-on examples. There are some policies regarding this, that we ask that you follow:

  • You may be given access to the project before the course; please do not use the allocation for running your own codes in. Usage of the project before the course means the priority of jobs submitted to it goes down, diminishing the opportunity for you and your fellow participants to run the examples during the course. You can read more detailed information about the job policies at HPC2N here.
  • The course project will be open 1-2 weeks after the course, giving the participants the opportunity to test run examples and shorter codes related to the course. During this time, we ask that you only use it for running course related jobs. Use your own discretion, but it could be: (modified) examples from the hands-on, short personal codes that have been modified to test things learned at the course, etc.
  • Anyone found to be misusing the course project, using up large amounts of the allocation for their own production runs, will be removed from the course project.
  • You will likely also be given access to a storage area connected to the compute project. Any data you store there should be course-related and if you wish to save it you should copy it to somewhere else soon after the course as it will be deleted about a month later.

The course uses computing resources provided by the Swedish National Infrastructure for Computing (SNIC) at HPC2N partially funded by the Swedish Research Council through grant agreement no. 2018-05973.

Registration

To register, please fill in the Registration form

Questions

Questions regarding this course should be directed to Lunarc using the support form.

Updated: 2024-10-10, 12:39