Skip to content

Software Modules

This page provides an introduction to software modules on the CMRI HPC cluster.


Getting Started

Software is provided on the CMRI HPC cluster using modules. Modules can be loaded and unloaded, allowing you to select specific versions and combinations of software to use. To view a list of available software modules, run the command module avail:

$ module avail

----------------- /mnt/archive/software/modulefiles -----------------
   R/3.6.3          git/2.37.2             (D)    pigz/2.7
   R/4.2.1   (D)    miniconda3/py39_4.9.2         python/2.7.18
   git/2.9.5        miniconda3/py39_4.12.0 (D)    python/3.10.6 (D)
...

To use a specific software module, you need to load it first using the module load command:

$ git --version
-bash: git: command not found
$ module load git/2.37.2
$ git --version
git version 2.37.2

Once a module is loaded, the software it contains can be accessed directly from the commandline.

Module Commands

Commonly used commands for interacting with software modules are listed below:

module avail
Lists all of the modules that are available.
module load <module_name>
Loads a module into your environment so that you can use it. Replace <module_name> with the name of a module (e.g. R/4.2.1).
module list
Lists all currently loaded software modules.
module unload <module_name>
Unloads a specific module from your environment. Replace <module_name> with the name of a module (e.g. R/4.2.1).
module purge
Unloads all modules from your environment.

Software Notes

This section has notes on common issues with specific modules and applications.

Java

Some Java applications (such as Nextflow) that communicate using SSL may not be able to find the Java certificate store. Errors typically look like this:

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Or you may be getting another error about having an invalid certificate. On-prem, we are subject to SSL (man-in-the-middle) inteception from Information Security's firewall appliances.

To work around this issue, pass the following option to the application to point it to this keystore that has our certificates already loaded in a Java Keystore format:

-Djavax.net.ssl.trustStore="/software/java/keystore/cmhkeystore" \
-Djavax.net.ssl.trustStorePassword="changeit"

DSI Studio

The steps below walk through how to run the DSI Studio GUI on the cluster.

X11 forwarding is required to run the GUI portion of DSI Studio. If you are using a Mac to connect to the cluster, you will need to install and run XQuartz before starting. Likewise, if you are using a Windows computer, you will need to install and run WSL2 or Xming first.

  1. Login to cmri-vm-login with X11 forwarding enabled, then run the screen command:

    ssh -X cmri-vm-login
    screen
    
  2. Start an interactive session on a node with X11 enabled using srun:

    srun --x11 -c 12 --mem=75G --pty /bin/bash
    
  3. In your interactive session, load the DSI Studio module and start the program:

    module load dsi-studio
    dsi_studio
    
  4. If you have set up X11 forwarding correctly, the application should launch on your desktop. If it was not set up correctly, you will likely see an error similar to this:

    qt.qpa.xcb: could not connect to display localhost:10.0
    
  5. Follow the DSI Studio GUI documentation to get started using the application.

Modules and Jupyter

Software modules can be used with Jupyter Notebook and JupyterLab sessions in Posit Workbench. For example, CUDA modules can be used to enable GPU acceleration for Tensorflow installed in a conda environment. The steps below walk through how to configure this use case:

  1. Load the CUDA, cuDNN, and Miniconda modules:

    module load cuda/11.7.1 cudnn/8.5.0_cuda-11.7.1 miniconda3/py39_4.12.0
    
  2. Create a new conda virtual environment:

    conda create -n <env_name> python=<python_version>
    
    • Replace <env_name> and <python_version> with a name for the environment and the Python version you want to use respectively.
  3. Activate the conda environment by running:

    conda activate <env_name>
    
  4. Install tensorflow and ipykernel, then register the conda environment as a kernel:

    conda install ipykernel
    pip install tensorflow
    python -m ipykernel install --user --name <env_name> --display-name "<display_name>"
    
    • Replace <env_name> and <display_name> with the name of the environment you are using and the display name you want to identify the environment with respectively.
  5. Modify the kernel configuration:

    cd ~/.local/share/jupyter/kernels/<env_name>
    
    • Edit kernel.json and add a new entry at the beginning of the "argv" array:

      "{resource_dir}/modules.sh",
      
  6. Create the file modules.sh in the current directory and add these lines:

    #!/bin/bash
    module load cuda/11.7.1 cudnn/8.5.0_cuda-11.7.1
    exec "$@"
    
  7. Make the script file executable:

    chmod u+x ./modules.sh
    

    Then launch a Jupyter Notebook or JupyterLab session and select the new kernel.

Next Steps

This page is meant to provide a brief introduction to using software modules on the CMRI HPC cluster, and just scratches the surface on how you can interact with them. For additional information on the module command, see the official Lmod documentation.

If you would like a different software version made available as a module or have a suggestion for a new module, please follow the steps on the Getting Help page to submit a ServiceNow ticket that includes:

  • The name of the software
  • The version(s) you would like made available
  • A brief justification for why the software is needed

Compiling your own software is also encouraged, but please be mindful of what system you compile it on. Login nodes such as cmri-vm-login should not be used - please use an interactive job instead. The Interactive Jobs section on the HPC Cluster page has information on how to run interactive jobs on the cluster. We recommend using Spack to simplify compiling your own software.

Sharing Modules

If you would like to create and share software modules with other researchers on the HPC Cluster, let us know! Software modules can easily be shared between researchers working on a common project. Please see the Getting Help page for instructions on submitting a request through Service Now.