LinuxModules

This page shows you how to handle your shell environment via the linux module system

Getting started

Enable modules on cuda01/adagio:

echo -e "\nexport MODULEPATH=/group/ag_cmb/software/modules:\$MODULEPATH" >> ~/.bashrc

Enable modules on cuda02/cuda03/allegro:

echo -e "\nexport MODULEPATH=/import/ag_cmb/software/modules:\$MODULEPATH" >> ~/.bashrc

Important notes

  • While the module files are available on all machines, the actual module command does not work on the local ones.
  • The AceMD code is only available on cuda02 and cuda03; yet, the acemd module is visible on allegro due to the shared file system.

For the impatient user

Use OpenMM in version 5.1:

schiffm@cuda03:~$ module load compiler/4.6.3 openmm/5.1 

Use the latest (installed) GitHub HEAD of OpenMM:

schiffm@cuda03:~$ module load compiler/4.6.3 openmm/git 

Use AceMD:

schiffm@cuda03:~$ module load acemd/dev.3124 

List all loaded modules:

schiffm@cuda03:~$ module list

List all available modules:

schiffm@cuda03:~$ module avail

Remove a loaded module:

schiffm@cuda03:~$ module unload openmm/git

Remove all loaded modules:

schiffm@cuda03:~$ module purge

Why should I use it?

The linux module system ...

  • enables us to have several non-interfering installations of the same software.
  • takes care of the necessary environment variables (shared libraries, third party codes, etc).
  • helps us to get rid of individual starting scripts.
  • is standard at many high performance computing centers ... so, get used to it early wink

How do I use it?

First, we use the module avail command to show all available modules:

schiffm@cuda03:~$ module avail

------------------------- /import/ag_cmb/software/modules --------------------------
acemd/dev.3124 compiler/4.6.3 openmm/5.1     openmm/git

--------------------------- /usr/share/modules/versions ----------------------------
3.2.9

-------------------------- /usr/share/modules/modulefiles --------------------------
dot         module-cvs  module-info modules     null        use.own

To see what happens when we load a module, we will use the acemd software as an example. Before we load the acemd module, we look at the PATH, LD_LIBRARY_PATH, and ACEMD_HOME variables and convince ourself that the latter is empty and that the others contain no trace of the acemd installation:

schiffm@cuda03:~$ echo $PATH
/home/schiffm/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/dell/srvadmin/bin
schiffm@cuda03:~$ echo $LD_LIBRARY_PATH 

schiffm@cuda03:~$ echo $ACEMD_HOME

Now, we load the module with the module load acemd/dev.3124 command

schiffm@cuda03:~$ module load acemd/dev.3124 
Module for acemd dev.3124 loaded.

and check again the PATH, LD_LIBRARY_PATH, and ACEMD_HOME variables

schiffm@cuda03:~$ echo $PATH
/import/ag_cmb/software/acemd-dev.3124/bin:/home/schiffm/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/dell/srvadmin/bin
schiffm@cuda03:~$ echo $LD_LIBRARY_PATH 
/import/ag_cmb/software/acemd-dev.3124/lib
schiffm@cuda03:~$ echo $ACEMD_HOME
/import/ag_cmb/software/acemd-dev.3124

Finally, we remove the acemd module again:

schiffm@cuda03:~$ module unload acemd/dev.3124

I won't show it here, but you can trust me that the acemd paths are now completely stripped from the PATH, LD_LIBRARY_PATH, and ACEMD_HOME variables wink

Where can I find these modules?

The modules for our local software installations are in the grouphome (on cuda01/adagio)

schiffm@cuda01:~$ ls -l /group/ag_cmb/software/modules/*
/group/ag_cmb/software/modules/compiler:
insgesamt 4
-rw-r--r-- 1 schiffm cmb 1032 Okt 30 09:34 4.6.3

/group/ag_cmb/software/modules/openmm:
insgesamt 8
-rw-r--r-- 1 schiffm cmb 1203 Okt 30 09:52 5.1
-rw-r--r-- 1 schiffm cmb 1203 Okt 30 09:52 git

and in the directory for local installations (on cuda02/cuda03/allegro)

schiffm@cuda03:~$ ls -l /import/ag_cmb/software/modules/*
/import/ag_cmb/software/modules/acemd:
insgesamt 2
-rw-r--r-- 1 schiffm biocomps 1107 Okt 30 10:17 dev.3124

/import/ag_cmb/software/modules/compiler:
insgesamt 2
-rw-r--r-- 1 schiffm biocomps 1033 Okt 30 10:05 4.6.3

/import/ag_cmb/software/modules/openmm:
insgesamt 3
-rw-r--r-- 1 schiffm biocomps 1204 Okt 30 10:06 5.1
-rw-r--r-- 1 schiffm biocomps 1204 Okt 30 10:06 git

Comments

 
Topic revision: r3 - 31 Oct 2013, ChristophWehmeyer
 
  • Printable version of this topic (p) Printable version of this topic (p)