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
Want to see the answers as a video?
Some HPC clusters have multiple remote desktops. We recommend:
HPC cluster |
YouTube video |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
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
Forgot how to do this?
Answer can be found at day 1
load the Python module of the version below
HPC cluster |
Python version |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
|
Forgot how to do this?
HPC cluster |
Python version |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
|
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 |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
|
Answer
From the terminal, use the command below to confirm that the package is not available yet:
HPC cluster |
Command |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
|
In all cases, the package is not yet installed, as that is what we’ll be doing next :-)
Find the software module to load the package. Use either the documentation of the HPC center, or use the module system
Answer: where is this documented?
HPC cluster |
URL to documentation |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
Here, but it is irrelevant |
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
Answer: how to use the module system?
In the terminal, type the command as shown below to get a decent hint.
There are many possible terms to use with module spider
: whatever
works for you is good too :-)
HPC cluster |
Command |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
Has no module system, use a container instead. |
|
|
Rackham |
|
Tetralith |
|
Load the software module
Answer
In the terminal, type the following command:
HPC cluster |
Command |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
Not applicable: we are using a container |
Rackham |
|
Tetralith |
|
Alternatively: |
See the package is now present
Answer
From the terminal, use the command below to confirm that the package is now available:
HPC cluster |
Command |
---|---|
Alvis |
|
Bianca |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
|
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