CCV uses the PyModules package for managing the software environment on OSCAR. The advantage of the modules approach is that it allows multiple versions of the same software to be installed at the same time. With the modules approach, you can "load'' and "unload'' modules to dynamically control your environment.
module availcommand allows searching modules based on partial names. For example:
$ module avail bo
will list all available modules whose name starts with "bo".
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name: bo*/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
boost/1.49.0 boost/1.63.0 bowtie2/2.3.0
This feature can be used for finding what versions of a module are available.
module loadcommand supports auto-completion of the module name using the "tab" key. For example, writing
module load bo"on the shell prompt and hitting "tab" key a couple of times will show results similar to that shown above. Similarly, the
module unloadcommand also auto completes using the names of modules which are loaded.
You can customize the default environment that is loaded when you login by putting the appropriate module commands in the
.modulesfile in your home directory. For instance, if you edited your
.modulesfile to contain
module load python/3.5.2
python/3.5.2 will be loaded every time you log in.
If you have not yet created a
.modulesfile in your home directory, you will have to create one and then add the commands you wish to have as defaults to that file.
Loading a module sets the relevant environment variables like
CPATH. For example, PATH contains all the directory paths (colon separated) where executable programs are searched for. So, by setting PATH through a module, now you can execute a program from anywhere in the file-system. Otherwise, you would have to mention the full path to the executable program file to run it which is very inconvenient. Similarly, LD_LIBRARY_PATH has all the directory paths where the run time linker searches for libraries while running a program, and so on. To see the values in an environment variable, use the
echocommand. For instance, to see what's in PATH:
$ echo $PATH