Module systems in supercomputers
- A variety of software with different (possibly conflicting)
requirements are needed on a supercomputer
- The solution for managing this situation: separating the
applications into modules
- Environment modules set up everything required by a
particular application:
- Load libraries, adjust paths, set environment variables
- CSC uses Lmod
environment modules
How to access pre-installed software on Roihu
- You can check the available applications and their respective
modules in the application list
- Each application page in Docs CSC contains information on basic
usage
- You can use
module spider to search for an application
- On LUMI you need to first run
module use /appl/local/csc/modulefiles to see modules
installed by CSC
- Use the software by loading the module:
module load modulename/version
- For example:
module load tykky/0.5.2
How to use modules
- The general syntax is simple:
module command modulename
- These modules are used both in interactive sessions and
batch jobs
- Include
module purge and
module load modulename/version in your batch scripts to
always get the same modules in consecutive jobs
- You can’t just load all the modules because of possibly conflicting
dependencies
Useful commands for the module environment
- These commands will help you navigate the module environment:
module list: See a list of the currently loaded
modules
module avail: Modules currently available for loading
(hides modules that can’t be loaded at the moment due to
dependencies)
module spider modulename: Search for an application in
the list of all existing modules
module spider modulename/version: Gives information on
how to load a specific version of a module (prerequisites
etc.)
- If you try to load a module that is unavailable, you will get an
error message
Various kinds of modules
- Some modules contain software that have a graphical user interface
- Some modules contain software that only provide a command-line
interface
- A module might contain only one program (e.g.
gromacs), while some provide a collection of applications
Separate modules for Roihu-CPU and Roihu-GPU
- Some modules are only available for Roihu-CPU, while others are only
for Roihu-GPU
- In practice,
module spider will show different modules
whether you’re connected to roihu-cpu.csc.fi or
roihu-gpu.csc.fi
- Reason: The CPU and GPU nodes have completely different
architectures
- Running a program built on Roihu-GPU on the CPU nodes (and vice
versa) will not work!
Conda, Python and R packages
- Some pre-installed software are distributed through the Conda package management
tool
- Do not install Conda environments directly on the Lustre parallel
file system, containerize
them instead using e.g. Tykky
- See the usage
policy for further details
- Pre-installed Python packages are available in
python-*
modules
- Check Docs CSC for the available packages and usage
instructions
- It is not possible to load multiple modules with Python packages at
once
pip list shows a list of packages
installed in the current environment
- Instructions on how to
check installed R libraries
- RStudio shows available packages in the sidebar
Customizing your own environment
- If you “always” use certain modules, it is possible to load them in
your
.bashrc, but we do not recommend this
- This causes the modules to be always loaded, also in batch jobs,
which may cause hard-to-spot issues
- Remember also that Roihu-CPU and Roihu-GPU do not have the same
modules available
- If it feels cumbersome to run multiple
module load modulenames at the start of each session, you
can define an alias for these in your .bashrc
- For example:
alias gpumods="module load modulenames"
- Now you can load the modules you need on Roihu-GPU easily with
gpumods (after logging out and in again, or
source ~/.bashrc)
- You can save your current set of modules with
module save filename and load it later with
module restore filename
- You can also write your own module files:
- Add them to your home directory, but keep CPU and GPU modules
separate
$HOME/modulefiles/cpu and
$HOME/modulefiles/gpu
- Add the appropriate path to the module search path
- For example, run
module use $HOME/modulefiles/cpu to be
able to find and load your own Roihu-CPU modules
- To see the parameters of a module file, use the command
module show modulename