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 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 |
|
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 |
|
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 |
|
COSMOS |
|
Dardel |
Here, but it is irrelevant |
Kebnekaise |
|
LUMI |
`Has no software modules <https://docs.lumi-supercomputer.eu/software/installing/python/#use-an-existing-container>__ |
`Use the thanard/matplotlib container <https://hub.docker.com/r/thanard/matplotlib>__ |
|
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 |
|
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 |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
Not applicable: we are using a container |
Rackham |
|
Tetralith |
|
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 |
|
COSMOS |
|
Dardel |
|
Kebnekaise |
|
LUMI |
|
Rackham |
|
Tetralith |
|
In all cases, the package is now installed. Well done!