This is an old revision of the document!
Table of Contents
Accessing Available Software
The cluster uses environment modules v3.2 to control what software is loaded in your environment. Certain software will be loaded by default, but there are other versions available to keep analyses consistent across a study or additional software that you may wish to load. Modules work by adding specific environmental variables needed for each package and/or adding them to your default search path.
What's Loaded?
- “module list” will show you what is currently loaded
[cmp12@blade08 ~]$ module list Currently Loaded Modulefiles: 1) fsl/6.0.3 2) freesurfer/7.1.1 3) afni/21.1.04 4) ants/2.3.4 5) mrtrix3/3.0.2 6) singularity/3.6.3 7) matlab/R2019b
What's Available?
- “module avail” will show you what additional software or alternative are available
[cmp12@blade08 ~]$ module avail ------------------------------------------ /etc/modulefiles ----------------------------------------------- afni/18.2.15 dtk/0.6.4.1 fsl/5.0.10 laynii/2.0.0 miniconda singularity/2.5.2 afni/21.1.04 ffmpeg/4.1 fsl/5.0.6 mango/4.0.1 mpi/mpich-3.0-x86_64 singularity/3.6.3 ansysEM/19.0 fidl/2.66 fsl/5.0.9 mango/4.1 mpi/mpich-x86_64 slicer/4.6.2 ansysEM/19.5 freesurfer/0_dev fsl/6.0.0 matlab/R2014a mpi/openmpi-x86_64(default) trackvis/0.6.1 ants/2.3.4 freesurfer/5.3.0 fsl/6.0.3 matlab/R2017a mricron weka/3.8.4 c3d/1.1.0 freesurfer/6.0.0 hcp_pipelines/3.27.0 matlab/R2018a mrtrix3/3.0.2(default) camino/2.1 freesurfer/6.0.1 hcp_workbench/1.4.0 matlab/R2019b(default) mrtrix3/mact dcm2niix freesurfer/7.1.1 hcp_workbench/1.4.2 matlab/R2021a mrtrix3/tissue dramms/1.5.1 fscan hcp_workbench/1.5.0 medinria/2.2.3(default) rar/5.70 dtiprep/1.2.4 fsl/5.0.1 laynii/1.5.6 medinria/4.0.0 simnibs/2.0.1
How to modify the environment
- to load additional software use “module load modulename(s)“
- just calling the modulename will load the highest version number of an available software, unless there is a “default” designation in the listing
[cmp12@blade08 ~]$ module load laynii dcm2niix fscan [cmp12@blade08 ~]$ module list Currently Loaded Modulefiles: 1) fsl/6.0.3 3) afni/21.1.04 5) mrtrix3/3.0.2 7) matlab/R2019b 9) dcm2niix 2) freesurfer/7.1.1 4) ants/2.3.4 6) singularity/3.6.3 8) laynii/2.0.0 10) fscan
If there is a package already loaded you should use the switch command to change versions
- “module switch modulename/version”
[cmp12@blade08 ~]$ which feat /usr/local/packages/fsl-6.0.3/bin/feat [cmp12@blade08 ~]$ module switch fsl/5.0.10 [cmp12@blade08 ~]$ module list Currently Loaded Modulefiles: 1) **fsl/5.0.10** 3) afni/21.1.04 5) mrtrix3/3.0.2 7) matlab/R2019b 9) dcm2niix 2) freesurfer/7.1.1 4) ants/2.3.4 6) singularity/3.6.3 8) laynii/2.0.0 10) fscan [cmp12@blade08 ~]$ which feat /usr/local/packages/fsl-5.0.10/bin/feat
- to remove a loaded package “module rm modulename” - to unload everything “module purge”
[cmp12@blade08 ~]$ module rm fsl [cmp12@blade08 ~]$ module list Currently Loaded Modulefiles: 1) freesurfer/7.1.1 3) ants/2.3.4 5) singularity/3.6.3 7) laynii/2.0.0 9) fscan 2) afni/21.1.04 4) mrtrix3/3.0.2 6) matlab/R2019b 8) dcm2niix [cmp12@blade08 ~]$ module purge [cmp12@blade08 ~]$ module list No Modulefiles Currently Loaded.
Make it consistent
You can add module calls to your submission scripts to keep the environment consistent for your jobs or you can add module calls to your ~/.bashrc initialization file to have a specific set of modules across all of your cluster jobs or interactive sessions.
[cmp12@blade01 ~]$ tail -n 10 ~/.bashrc module purge module load fsl/6.0.0 freesurfer/6.0.1 matlab/R2018a [cmp12@blade01 ~]$ module list Currently Loaded Modulefiles: 1) fsl/6.0.0 2) freesurfer/6.0.1 3) matlab/R2018a
If there are certain packages that are not available you can always email biac-help@duke.edu to request them. Additionally, standard linux software will not show up in the module list ( ie: cmake3, gcc ). Usually the which or locate command is an easy way to see of they are available.
[cmp12@blade01 ~]$ which python3 /usr/bin/python3 [cmp12@blade01 ~]$ which cmake3 ~/bin/cmake3