Using packages

Learning outcomes

  • Practice using the documentation of your HPC cluster

  • Can find and load a Python package module

  • Can determine if a Python package is installed

Why Python packages are important

Python packages are pieces of tested Python code. Prefer using a Python package over writing your own code.

Why software modules are important

Software modules allows users of any HPC cluster to activate their favorite software of any version. This helps to assure reproducible research.

Exercises

Exercise 0: pick a Zoom room

We will use breakout rooms, as this is best for learning. Ideally, each breakout room has 2 learners for the same HPC cluster. As it cannot be predicted how many learners show up per cluster, we do this dynamically:

  • Go to the main breakout room of your HPC cluster

HPC cluster name

Main breakout room

Alvis

Room 1

Bianca

Room 2

COSMOS

Room 3

Dardel

Room 4

Kebnekaise

Room 5

LUMI

Room 6

Rackham

Room 7

Tetralith

Room 8

  • When the main breakout room reaches 4 learners, decide upon 2 to move to a free breakout room. Repeat until the group size is below 4.

  • When you are the only one in your main breakout room, the teachers will let you decide to either work in silence or to join another group. You will be taken care of well :-)

Exercise 1: using Python packages

  • login to your HPC cluster

  • load the Python module of the version below

HPC cluster

Python version

Alvis

3.12.3

Bianca

3.12.7

COSMOS

3.11.5

Dardel

3.11.4

Kebnekaise

3.11.3

LUMI

3.11.7

Rackham

3.12.7

Tetralith

3.11.5 (bare)

  • Confirm that the Python package, indicated in the table below, is absent. You can use any way to do so.

HPC cluster

Python package

Alvis

scipy

Bianca

tensorflow (CPU version)

COSMOS

scipy

Dardel

tensorflow

Kebnekaise

scipy

LUMI

matplotlib

Rackham

tensorflow (CPU version)

Tetralith

scipy

  • Find the software module to load the package. Use either the documentation of the HPC center, or use the module system

  • Load the software module

  • See the package is now present

In all cases, the package is now installed. Well done!

Done?

When done, and if you haven’t done so yet, do Use the tarball with exercises.

After that, read what the next session is about.

You can easily navigate there by pressing the ‘Next’ arrow at the bottom of this page, at the right-hand side