This lesson is still being designed and assembled (Pre-Alpha version)

Section 2: Running code on Bura

Overview

Teaching: 5 min
Exercises: 0 min
Questions
  • What are the topics covered in this section?

Objectives
  • Understand the scope of today’s session.

  • Activate the virtual environment and load modules needed for the code examples.

In this section, we will do some hands-on exercises to learn what sequential, parallel, and GPU code looks like in real life, and how to adapt your code when you switch to another code execution mode. We are going to look into why Python relies on other languages, such as C and Cuda, for massive parallelization, which tools can be used for monitoring the performance of your code and how to use Slurm for running your code across various nodes.

We will use the virtual environment that we created in the previous episodes, so don’t forget to run the commands for activating your environment and loading the modules we’ll use in the code examples:

$ source interpython/bin/activate
$ module load python/Python-3.10.5
$ module load mpi/intel-2021.5
$ module load gcc/gcc-13.2.0

If you missed to create a virtual environment yesterday, you can create it using the following command:

python -m venv interpython

Once you run this, you can then run the commands mentioned above for activating the virtual environment and loading the modules.

Key Points

  • We will rely on practical exercises to learn what different modes of program execution look like in real life and which tools we can use for performance analysis.