Software modules make it easy for you to use software installed on CS servers. We provide a wide range of software across all our servers so that you don't have to install software on your own. We also offer different versions of software, letting users choose which they want to use.
Software modules modify Environment Variables unique to your shell. Environment variables include for example the variable PATH
, which are directory path(s) to executables to use when typing a command in your terminal. For example, when you log in via SSH, variables such as the PATH
variable are set or updated to contain the location(s) of various executable commands such as vim
, sinfo
, and others.
Each time you load a module, this variable and others are updated to make additional commands or libraries available to your shell.
If software is required but is not listed, please send an email to cshelpdesk@virginia.edu
with the following information:
In January of 2025, the CS department is transitioning the backend software used for interacting with modules from Environment Modules to LMOD (LMOD Homepage), and implementing EasyBuild (EasyBuild Homepage) for maintaining modules.
module avail
Under this new system, there will be three primary types of modulefiles and available software
matlab
, gurobi
, etc.)module purge
before loading software or when switching modules is recommended. This ensures dependency modules are unloaded from other software(s) and only the software you want is loadedgcc/11.2.0
instead of a dash character gcc-11.2.0
(D)
when using module avail
cuda-toolkit
is now cuda
cudnn-<version>_cuda<version>
is now cudnn/<version>-CUDA-<version>
python3
is now python/3.12.3
, or simply python
for the latest version availablepython2
is now python/2.7.18
afl-2.57b
apktool-2.3.2
binutils-2.27.0
clang-llvm-7.1.0
clang-llvm-11.1.0
cmake-3.15.2
cmake-3.15.2
cuda-toolkit-10.2
cuda-toolkit-11.2.2
cudnn-8.9.5_cuda11.x
cppcheck-2.7
dmd-2.088.0
dmd-2.100.0
doxygen-1.8.14
edb-1.3.0
emacs-25.3
emacs-28.1
fio-3.30
git-2.37.1
git-2.9.5
go-1.19.1
gradle-5.1
gradle-7.5.1
infer-0.17.0
java18-18.0.1
java8-1.8.0_202
java8-1.8.0_371
lammps-23Jun2022
libav-12.3
lua-5.3.6
maven-3.8.6
nano-6.0
nano-6.3
nccl-9.2
nccl-10.2
nccl-11.0
nccl-11.8
neovim-0.9.5
nvhpc-20.7
nvhpc-22.9
nvtop-3.0.0
openmpi-4.0.2
perl-5.26
pmix-2.2.3
pmix-3.2.3
python-2.7.15
python-3.8.0
python-3.10.11
python-3.10.12
python-3.10.13
r-3.6.1
rstudio-2022.07.2
ruby-3.1.2
rust-1.27.0
rust-1.77.0
sbt-1.2.8
sbt-1.7.3
scala-2.13.0
scala-3.2.0
scons-3.0.1
sqlite-3.25.3
swig-4.2.0
tensorrt-8.6.1_cuda12.1
tmux-2.3
tmux-2.7
valgrind 3.13.0
(now a local OS package install on each server)valgrind 3.20.0
(now a local OS package install on each server)valgrind 3.23.0
(now a local OS package install on each server)verilator-4.024
gcc
and gcccore
?GCCCore
can be considered a base or core compiler used for compiling items such as CLang
GCC
bundles GCCCore
and other packages such as binutils
gcccore/<version>
as a requirement, loading gcc/<version>
will also workcompinit: function definition file not found
. To solve this, execute the following command before starting your zsh shellunset FPATH
zsh
source /etc/profile.d/modules.sh
(this may not be necessary depending on your zsh configurations)module command not found
is displayed. To resolve this, simply execute source /etc/profile.d/modules.sh
in your terminal (including in VSCode)
Modules are compiled using a toolchain such as gcc
, the system default (i.e. what the server has available), or others. This means that modules compiled using a toolchain will not be available (i.e. won't be shown with module avail
) until the toolchain has been loaded.
For example, openmpi
will not show up in the module avail
output until the appropriate GCC toolchain is loaded. Required modules can be found by using the module spider <module name & version>
as shown below.
In-depth information about module usage and interaction can be found (here).
To list available modules
module avail
To load a default module (no version specified)
module load <module name>
To load a specific version, include the version suffix
module load <module name>/1.2.3
To search for modules and list required dependency modules to load certain modules
module spider <module name & version>
For example, to load python
, first search for what python versions are available
module spider python ---------------------------- python: ---------------------------- Description: Python is a programming language that lets you work more quickly and integrate your systems more effectively. Versions: python/2.7.18 python/3.10.8 python/3.11.3 python/3.12.3
Then, search for required modules to load first before loading a specific version of python
module spider python/3.12.3 ---------------------------- python: python/3.12.3 ---------------------------- ... output omitted ... You will need to load all module(s) on any one of the lines below before the "python/3.12.3" module is available to load. gcccore/13.3.0
Thus, gcccore/13.3.0
is required to load python/3.12.3
module load gcccore/13.3.0 module load python/3.12.3
Alternatively, you can load the required module and the module itself on one line
module load gcccore/13.3.0 python/3.12.3
To load the default version, simply omit the version
module load gcccore python
To show all currently loaded modules
module list
To show information about a module
module whatis <module name & version>
To unload a module
module list
command, which are not unloaded automatically. It's recommended to purge (unload all) modules insteadmodule unload <module name & version>
To purge (unload all) loaded modules
module purge
Before submitting a job, it is recommended to unload all loaded modules using module purge
before and during the job launch, and then load them in the job script or at the command line for an interactive job.
This ensures that no unexpected modules are carried forward into your job from your shell's environment variables.
#!/bin/bash #SBATCH --gres=gpu:1 #SBATCH --mem=16000 #SBATCH -t 04:00:00 #SBATCH -p gpu #SBATCH --mail-type=begin,end #SBATCH --mail-user=<computingID>@virginia.edu module purge module load gcc module load python python3 myprogram
For most Python related packages (i.e. pip install …), it is often more applicable to utilize a virtual environment. This can be done with Conda or venv. The former requires loading an miniforge module, and the latter requires the python3 module.
After loading and using this module, your ~/.bashrc
file will be updated to source the base environment each time you log in.
After logging into portal, load the module and configure your login shell (altering the file ~/.bashrc
) to source the base environment to allow for conda activate
commands
abc1de@portal01:~$ module load miniforge abc1de@portal01:~$ conda init bash // after logging out and back in (base) abc1de@portal01:~$ conda create -n mynewenvironment
This will by default create an environment named mynewenvironment
in ~/abc1de/.conda/envs/
.
You can also specify a path where an environment should be created
(base) abc1de@portal01:~$ conda create -n mynewenvironment --prefix /p/myprojectdirectory/condaenvs
Packages can be specifed when creating an environment
(base) abc1de@portal01:~$ conda create -n mynewenvironment matplotlib=3.5 numpy=1.21
Environments can be created using a .yml
file as well
(base) abc1de@portal01:~$ conda env create -f /<path>/env.yml
To list available environments
(base) abc1de@portal01:~$ conda env list OR (base) abc1de@portal01:~$ conda info --envs
To activate an environment (if the name is shown with conda env list
)
(base) abc1de@portal01:~$ conda activate mynewenvironment
To activate an environment by path
(base) abc1de@portal01:~$ conda activate /<path>/mycustompathenv
After logging into portal, load the python
module
abc1de@portal01:~$ module load python
To create a python3 venv envrionment
abc1de@portal01:~$ python3 -m venv /<path>/myvenv
To activate a python3 venv environment
abc1de@portal01:~$ source /<path>/myvenv/bin/activate
Commands such as pip3
can now be used within the envrionment
abc1de@portal01:~$ which pip3 /<path>/myenv/bin/pip3 abc1de@portal01:~$ pip3 install <package name>
A Jupyter Notebook interface can be loaded using a virtual environment (as described above). This is best done using a NX virtual desktop. Once you've logged into your NX virtual desktop, load python3 or miniforge as a software module:
abc1de@labsrv03~:$ module load miniforge
Then, load Jupyter Notebook:
abc1de@labsrv03~:$ Jupyter Notebook
Follow the link given to you by the Notebook Server to access the interface:
[W 12:52:23.489 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension. [I 12:52:23.492 NotebookApp] Serving notebooks from local directory: /u/abc1de [I 12:52:23.492 NotebookApp] Jupyter Notebook 6.5.4 is running at: [I 12:52:23.492 NotebookApp] http://localhost:8888/?token=eb9345040d71bbeb1eddc75fb88504f98e25beb207907f6d [I 12:52:23.492 NotebookApp] or http://127.0.0.1:8888/?token=eb9345040d71bbeb1eddc75fb88504f98e25beb207907f6d [I 12:52:23.492 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 12:52:23.634 NotebookApp] To access the notebook, open this file in a browser: file:///u/<youruserid>/.local/share/jupyter/runtime/nbserver-20880-open.html for example... file:///u/abc1de/.local/share/jupyter/runtime/nbserver-20880-open.html
Apptainer is the supported software for using containers throughout the CS environment. See our page on (Apptainer) for more information.