When logging in to any of the HURCS servers, some software is available for immediate use, while other software packages are installed but not available directly.
Such packages are organized in Modules. The modules service is a mechanism for loading these software packages that are installed in the cluster but not available immediately after login.
The modules service allows you to select which software or software version to use in your current session or job.
Once a new session is opened (for instance, after logging out and logging back in, or opening a new terminal session) the slate is clean, modules will not be automatically loaded again!
The following scientific software tools are available as modules
bamtools@2.5.2 bcftools@1.19 bcl2fastq2@2.20.0.422 bedtools2@2.31.1 bismark@0.24.1 bowtie2@2.5.2 bs@64-linux bwa@0.7.17
cdhit@4.8.1cdo@2.4.3 dorado@0.5.3 dorado@0.9.0 dupsifter@1.3.0 cufflinks@2.2.1 eig@8.0.0 elfutils@0.191 fastqc@0.12.1 freetype@2.13.2
freesurfer@7.4.1 gatk@4.5.0.0 git@2.39.2 gtkplus@3.24.41 hdf5@1.14.3 homer@5.1 igv@2.16.2 intel-oneapi-compilers@2024.2.0
nextflow@24.04.3 openmpi@4.1.6 itk@5.2.1julia@1.10.4 libepoxy@1.5.10-1 meme@5.5.4 miniconda3@24.3.0 netcdf-c@4.9.2 netcdf-c@4.9.2
netcdf-fortran@4.6.1 opencv@4.8.0 openjdk@1.8.0_265-b01 petpvc@1.2.11 phyml@3.3.20220408 picard@3.1.1 polars-lts-cpu@1.20.0
py-astropy@6.1.0 py-cartopy@0.23.0 py-cdo@1.5.6 py-cutadapt@4.7 py-deeptools@3.5.3 py-grpcio@1.64.0 py-htseq@2.0.3 py-macs2@2.2.8
py-mpi4py@3.1.6 py-ont-remora@3.2.2 py-plotnine@0.9.0 py-pysam@0.21.0 py-sigpro@main py-tensorflow@2.17.0 py-torch@2.3.1
py-torchaudio@2.3.1 qualimap@2.3 relion5@5.0 rsem@1.3.3 scrmshawhd@1.0 seacr@1.3 slow5-pod5-converter@main snakemake@8.5.2 spades@4.0.0
star@2.7.11b spm@12_r7219 snippy@4.6.0 sratoolkit@3.0.0 stacks@2.68subread@2.0.6 trimgalore@0.6.10 trimmomatic@0.39 tophat@2.1.2
trinity@2.15.1.FULL vep@113 vtk@8.2.1a xenofilter@master
Because software modules are not available on the head node, running module related commands (as detailed below) for them, requires that you will use srun as follows:
srun zsh -c ". /etc/profile.d/huji-lmod.sh; module <command>"
For example:
srun zsh -c ". /etc/profile.d/huji-lmod.sh; module display netcdf-fortran/4.6.1-x86_64-gcc-12.2.0-4d45por"
For additional info and some advanced topics regarding software modules, see this page.
help - see all available options in module command
module help
avail - list all available modules in cluster
module avail
Or in short
module av
The avail command will show you all available module with their names and software version in the format “module-name/version”
For example, the output above shows the availability of the R4 software package (R programming language, magor version #4) in two ‘flavors’- R4 in version 4.0.5 and R4 in version 4.1.0.
list - list currently loaded modules
module list
load - load a module with the default version
module load module-name
To load several modules at once
module load module1-name module2-name module3-name
If a module is already loaded you will see the letter L in brackets near it when displaying all modules with command avail.
If there are several versions available then you will see the letter D in brackets next to the default module when displaying all modules with command avail.
This version will be loaded if you don’t select a specific version.
To load a module with specific version (e.g. 2.1)
module load module-name/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 without failing if it doesn't exist:
module try-load module-name
unload - unload a module
module unload module-name
purge - unload all loaded modules
module purge
spider - search for a module
module spider module-name
You can see all modules that are installed for the moriah cluster in this wiki page.
When running batch jobs in the cluster with sbatch command, the shell environment from which the script is launched will not be copied over to the cluster. Any modules you may need for your jobs must be added to the script, after the SBATCH arguments section.
For example:
#!/bin/bash
#SBATCH -n 1
#SBATCH --mem=1G
#SBATCH --time=1-0
module load module-name
my-command
If you prefer entering sbatch options in command line then create a script with these lines in it:
#!/bin/bash
module load module-name
my-command
Then in command line:
sbatch my-script-with-module-load.sh
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 '.
We remind you once more that software modules will not load on the cluster head node and that on workstations you have to load the “spack” module first.
To load e.g. tensorflow by default upon login, this file should contain:
module try-load spack tensorflow
You can use the following command to add the line to the ~/.lmodrc file:
touch ~/.lmodrc echo 'module try-load spack tensorflow' >> ~/.lmodrc
Where the first part, touch ~/.lmodrc
, ensures that the file exists in your home folder and the second part, echo 'module try-load tensorflow' >> ~/.lmodrc
, appends the line in quotes to it.