Python in HPC

Welcome to Python in HPC at ICHEC. We hope that you enjoy this course and learn a lot from it. Although this can be undertaken on your laptop at home, we recommend that you undertake this as part of our training courses either in person or online.

Prerequisites

You should be familiar with Python and have some understanding of syntax and workflows. Using a terminal to execute and run code, and well as some experience would be advantageous but not essential.

For participants

  1. If you are working through this yourself, please be aware of the need of environments. You can use the environments in the directory here.
  2. Use git clone to clone the repository from ICHEC-learn. You will be able to access the Jupyter notebooks, files, solutions to exercises and markdown files from there.
  3. To register for a live version of this course, contact ICHEC at support@ichec.ie or subscribe to our mailing list to be notified of upcoming courses.

Schedule

Setup Download files required for the lesson
00:00 1. Python in HPC Why would one use Python in High Performance Computing?
What is Python’s reference counter and garbage collector?
What are the different parallelisation strategies for Python?
00:20 2. Timing Code and Simple Speed-up Techniques How can I time my code
What is the difference between vectorisation and for loops?
What is the cache?
How can lru_cache speed up my code?
01:35 3. Numba What is Just-In-Time compilation
How can I implement Numba
02:50 4. Cython What is Cython?
What’s happening under the hood?
How can I implement a Cython workflow?
How can I create C-type declarations?
04:35 5. C Foreign Function Interface for Python What is a foreign function interface?
How can I implement CFFI?
Under what circumstances should I use CFFI?
05:35 6. MPI with Python What is the difference between a process and a thread?
What is the difference between shared and distributed memory?
What is a communicator and rank?
07:20 7. Non-blocking and collective communications Why do we need non-blocking communication?
What are the different collective routines and how can I implement them?
08:50 8. Dask What is Dask?
How can I implement Dask array?
How can I use Dask MPI
10:20 9. GPUs with Python What is a GPU?
What is CUDA?
How can I submit a job to a GPU?
11:15 Finish