Some software is installed globally but in special locations or with several versions. The modules mechanism allows users to select which software/version they want to use in their current session. The modules software used on the linux machines in the cs network is lmod.
To see all available commands
module help
To list all available modules
module avail
Some modules only become available after other modules have been loaded
To load a module (e.g. mymodule) with the default version
module load mymodule
To load several modules at once
module load mymodule yourmodule hismodule
To load a module with specific version (e.g. 2.1)
module load mymodule/2.1
A module can only be loaded once, if loading a different version the previous will be automatically unloaded first.
To try to load a module, but don't fail if it doesn't exist:
module try-load nonexisiting
To unload a module (mymodule):
module unload mymodule
To list loaded modules
module list
To unload all loaded modules
module purge
To load modules on login, lmod reads the ~/.lmodrc file. This file is sourced by bash and (t)csh so it should contain only lines beginning with 'module '.
To load e.g. tensorflow by default upon login, this file should contain:
module try-load tensorflow
Or run:
touch ~/.lmodrc echo 'module try-load tensorflow' >> ~/.lmodrc
Starting at distribution 5785 most of our scientific software is available via the Spack packages manager. Form a user perspective, these software packages are available as modules. Spack modules are not automatically available. To make them available, enter the command
module load spack
Then, if you execute “module avail”, you will see that a rather large number of packages was added to the list. You can also load a specific Spack based package directly (in your sbtach scripts, etc), using for example:
module load spack netcdf-fortran
Note that this will load all the dependencies of the module as well, so in this case netcdf-c and openmpi will be loaded too.
For additional info and some advanced topics regarding Spack modules, see this page.