Help:Modules

Modules
There are various possibilities to setup the user environment with the Modules utility, described in this configuration guide.

You're encouraged to define modules for the software you install on the CSE experts-dedicated folder. On Bellatrix, it is called "/opt/software/cse-software/modulefiles".

Create a folder per software containing a file per version, along these lines:

root@bellatrix:/opt/software/modulefiles > ll python total 20 4 drwxr-xr-x 2 root     root     4096 Jan  7 11:17. 4 drwxrwxr-x 29 root    root     4096 Mar  4 10:48 .. 4 -rw-r--r-- 1 rpmbuild rpmbuild  799 Jan  7 11:14 2.7.3 4 -rw-r--r-- 1 rpmbuild rpmbuild  799 Jan  7 11:08 3.2.3 4 -rw-r--r-- 1 rpmbuild rpmbuild  799 Jan  7 11:16 3.3.0

Indicating the compiler and MPI version is useful depending on the software:

root@bellatrix:/opt/software/modulefiles > ll gsl total 16 4 drwxrwxr-x 2 root root 4096 Mar  4 10:49. 4 drwxrwxr-x 29 root root 4096 Mar 4 10:48 .. 4 -rw-rw-r-- 1 root root  740 Mar  4 10:47 1.15-gcc-4.4.6 4 -rw-rw-r-- 1 root root  830 Mar  4 10:49 1.15-intel-13.0.1

root@bellatrix:/opt/software/modulefiles > ll openmpi/ total 20 4 drwxr-xr-x 2 root     root     4096 Mar  4 11:03. 4 drwxrwxr-x 29 root    root     4096 Mar  4 10:48 .. 4 -rw-r--r-- 1 rpmbuild rpmbuild  789 Feb 26 15:11 1.6.3-gcc-4.4.6 4 -rw-rw-r-- 1 rpmbuild rpmbuild  812 Feb 26 15:16 1.6.3-gcc-4.7.2 4 -rw-rw-r-- 1 rpmbuild rpmbuild  912 Feb 26 15:19 1.6.3-intel-13.0.1

You can look at the examples in "/opt/software/modulefiles" at will.

The module definitions themselves look like this:

root@bellatrix:/opt/software/modulefiles > cat gcc/4.7.2 ## ## proc ModulesHelp { } { global version puts stderr "\tThis module loads the gcc 4.7.2 environment" puts stderr "\tVersion ${version}" puts stderr "\n\tType 'module list' to list all the loaded modules" puts stderr "\tand 'module avail' to list all the availables ones." } module-whatis  "loads the gcc 4.7.2 environment" module load gmp/5.1.0 module load mpfr/3.1.1 module load mpc/1.0.1 set            version		4.7.2 set            root		/opt/software/gcc/${version} prepend-path   PATH           	${root}/bin prepend-path 	MANPATH		${root}/man prepend-path	LD_LIBRARY_PATH	$root/lib64
 * 1) %Module1.0#####################################################################
 * 1) python modulefile
 * 1) for Tcl script use only

There are examples in "/opt/software/modulefiles".