module
¶On Balena module
is used to manage different libraries and pieces of software. Unlike you own machine where you likely have one set of up packages each running with the latest versions on Balena there are many different applications each with different versions and libraries that they rely on. Tools like module ensure researchers can access the versions of applications and libraries they want and allow the service to be managed more easily. It also means that the correct dependencies, typically libraries that are used to compile applications can be loaded automatically making life easier for users.
You can check what modules are loaded when you first log-in to Balena:
module list
You can also run this command at any time to check which modules you have loaded or removed.
By default only gcc/4.9.3
and slurm/17.11.17
are loaded.
gcc
provides the standard serial gnu compiler suiteslurm
is the scheduler which manages the queue and allows you to run jobsWe will discuss slurm
in more detail in the following episode. For now let's find what other modules are available:
module avail
As you will see there is a lot of software available. It is broken down into sections:
Section | Content |
---|---|
/apps/modules/balena | Balena specific modules |
/apps/modules/applications | (HPC) Applications |
/apps/modules/compilers-langs | Programming languages and compilers |
/apps/modules/libraries | Additional libraries |
/apps/modules/tools | Build, debugging & profiling tools |
In order to access these modules they need to be loaded:
module load python3
When loading modules it is important to ensure that you are clear about which module you are using. If we wanted to use gcc/9.2.0
, how can we ensure that we use this version rather than the default that gcc/4.9.3
that is loaded we when login? We can swap or switch modules:
module switch gcc/4.9.3 gcc/9.2.0
Also if you are installing multiple libraries, e.g. the intel compiler
, mpi
and maths
libraries make sure they are the same version, or that they match e.g. are all intel
flavours or all gcc
flavours of libraries.
Finally if you want to clean you environment of all modules to start from scratch you can use:
module purge