Module System
A large number of popular software packages are installed on Palmetto and can be used without any setup or configuration. These include:
- Compilers (such as
gcc
, Intel) - Libraries (such as OpenMPI, HDF5, Boost)
- Programming languages (such as Python, MATLAB, R)
- Scientific applications (such as LAMMPS, ANSYS)
- Others (e.g., Git, )
These packages are available as modules on Palmetto. The following commands can be used to inspect, activate and deactivate modules:
Command | Purpose |
---|---|
module avail | List all packages available (on current system) |
module spider package | List all packages with package in the name |
module load package/version | Add a package to your current shell environment |
module list | List packages you have loaded |
module rm package/version | Remove a currently loaded package |
module purge | Remove all currently loaded packages |
For example, to see what versions of Matlab are installed, you can use the command:
$ module spider matlab
------------------------------------
matlab:
------------------------------------
Versions:
matlab/2022a
matlab/2023a
matlab/2023b
To load the GCC (v12.3.0) and OpenMPI (v4.1.6) modules, you can use the command:
module load gcc/12.3.0 openmpi/4.1.6
Then, check the version of gcc
:
$ gcc --version
gcc (GCC) 12.3.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To view all the modules you have loaded:
$ module list
Currently Loaded Modules:
1) gcc/12.3.0 2) openmpi/4.1.6
Some modules when loaded, implicitly load other modules as well. If you use some modules to compile/install some software, then you will probably have to load them when running that software as well, otherwise you may see errors about missing libraries/headers. Modules do not remain loaded when you log out and log back in, i.e., they are active only for the current session - so you will need to load them for every session.
As an exercise, examine the environment variables PATH, LIBRARY_PATH, etc., before and after loading some module:
echo $PATH
module add anaconda3/2023.09-0
echo $PATH
You can also look at the module files in /software/ModuleFiles
to understand
what happens when you add a module.