Python for High Performance Computing

Europe/Berlin
Online

Online

Sebastian Kehl (MPCDF), Sebastian Ohlmann (MPCDF), Klaus Reuter (MPCDF)
Description

MPCDF Online Course on "Python for HPC", November 26 - 28, 2024

Welcome to the MPCDF course on "Python for HPC"!

Please find below all the information necessary to participate.

Times and Topics

The online course will be given from November 26 to November 28, 2024,
(Tuesday to Thursday) with lectures in the morning from 9:00 to
12:30 and exercise sessions at 16:00 in the afternoon. We provide
the slides and exercises as Jupyter notebooks that participants can
work on independently. In the exercise session, we will go through
solutions to some of the exercises and we also offer to answer
questions.

The tentative schedule is as follows:

------------|---------------|----------------------------------------
 Date       | Time          |    Topic
------------|---------------|----------------------------------------
 Tue, 11/26 |  9:00 - 10:30 | 1  Introduction, Basic HPC
            | 10:30 - 11:00 |    Break
            | 11:00 - 12:30 | 2  Numpy, Scipy
            |               |
            | 16:00 - 17:00 |    Exercise session
            |               |
            |               |
 Wed, 11/27 |  9:00 - 10:30 | 3  Cython, Numba, Interfacing C/Fortran
            | 10:30 - 11:00 |    Break
            | 11:00 - 12:30 | 4  GPU, Profiling, Software Engineering,
            | 16:00 - 17:00 |    Exercise session
            |               |
            |               |
 Thu, 11/28 |  9:00 - 10:30 | 5  Parallel programming I: Shared Memory, Dask
            | 10:30 - 11:00 |    Break
            | 11:00 - 12:30 | 6  Parallel programming II: MPI, Q&A
            |               |
            | 16:00 - 17:00 |    Exercise session
------------|---------------|----------------------------------------

Connection Details

The course will be given via Zoom, the connection details will be
sent to the participants by email in due time.

The virtual room will be opened about 15 minutes before the
lectures and exercises start.

Course Material

The course material (i.e. Jupyter notebooks from the lectures and
exercises, and additional files) is available via Git.
The link will be sent to the participants by email in due time.

Software Prerequisites

To run the code examples and do the exercises, a Python 3
installation including NumPy, SciPy, Numba, matplotlib, and Jupyter
is required.  For the part on Cython and interfacing with C and
Fortran, a compiler such as `gcc` and `gfortran` is necessary. For
the last part on distributed-memory parallelization using MPI, a
working mpi4py installation is required.

For all participants, there will be an option to do the exercises
and experiments on Jupyter instances in a Cloud platform. Details
will be communicated separately in due time.

Abstract

The Python programming language and its software ecosystem have
become very popular in scientific computing for various reasons.
Users not only implement prototypes for numerical experiments on
small scales, but also develop parallel production codes, thereby
partly replacing compiled languages such as C, C++, and Fortran.
However, when following this approach it is crucial to pay special
attention to performance. This course teaches approaches to use
Python efficiently and reasonably in a HPC environment. The first
lecture gives a whirlwind tour through the Python programming
language and the standard library. In the following, the lectures
strongly focus on performance-related topics such as NumPy, Cython,
Numba, compiled C- and Fortran extensions, profiling of Python and
compiled code, parallelism using multiprocessing and mpi4py,
parallel frameworks such as Dask, and efficient IO with HDF5. In
addition, we will cover topics more related to software-engineering
such as packaging, publishing, testing, and the semi-automated
generation of documentation. Finally, basic visualization tasks
using matplotlib and similar packages are discussed.

The lectures will be given based on Jupyter notebooks and will
include many reusable code examples. For each topic, hands-on
exercises are available and will be discussed in separate sessions.
On the last day, there will be time for a general question & answer
session.

Registration
Python for HPC Registration
MPCDF Training
    • 09:00 10:30
      Introduction and Basic HPC 1h 30m
    • 10:30 11:00
      Break 30m
    • 11:00 12:30
      NumPy and SciPy 1h 30m
    • 12:30 13:00
      Q&A 30m
    • 16:00 17:00
      Exercise Session and Q&A 1h
    • 09:00 10:30
      Cython, Numba, JAX, Interfacing 1h 30m
    • 10:30 11:00
      Break 30m
    • 11:00 12:30
      Interfacing cont'd, Profiling, Software Engineering 1h 30m
    • 12:30 13:00
      Q&A 30m
    • 16:00 17:00
      Exercise Session and Q&A 1h
    • 09:00 10:30
      Parallel Programming I: Shared Memory, GPU 1h 30m
    • 10:30 11:00
      Break 30m
    • 11:00 12:30
      Parallel Programming II: Dask, MPI, Q&A 1h 30m
    • 16:00 17:00
      Exercise Session and Q&A 1h