User Tools

Site Tools


biac:cluster:modules

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 

Get more info about a module

To get more info about a specific module use the “module display” or “module whatis” command.

 
[cmp12@blade01 ~]$ module display fsl 
------------------------------------------------------------------- 
/etc/modulefiles/fsl/6.0.3: 

module-whatis	 loads the fsl v6.0.3 environment  
setenv		 FSLDIR /usr/local/packages/fsl-6.0.3  
setenv		 FSLSUBMIT 0  
setenv		 FSL_DIR /usr/local/packages/fsl-6.0.3  
setenv		 FSL_BIN /usr/local/packages/fsl-6.0.3/bin  
setenv		 FSLTCLSH /usr/local/packages/fsl-6.0.3/bin/fsltclsh  
setenv		 FSLWISH /usr/local/packages/fsl-6.0.3/bin/fslwish  
setenv		 FSLOUTPUTTYPE NIFTI_GZ  
prepend-path	 PATH /usr/local/packages/fsl-6.0.3/bin  
------------------------------------------------------------------- 


[cmp12@blade01 ~]$ module whatis fsl 
fsl                  : loads the fsl v6.0.3 environment 

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 
biac/cluster/modules.txt · Last modified: 2021/05/12 18:00 by cmp12