Introduction
USC has implemented envrionment module method to managing users environment for all softwares installed on our HPC systems. Users are required very often to define some variables that affect the environment and the operation of the program executed under this environment. These environment variables are used to inform the HPC system the location of execution files, documentation, or related libraries. This would make new user or users unfamiliar with UNIX-like system very annoying. Through the module approach, however, users are no longer painful with configuring user’s environment. The scripts(modulefiles) are made by the staff and users simply “load” and “unload” modules to configure the environment.
Environment module approach updates user’s environment very easily, especially PATH, LD_LIBRARY_PATH, MANPATH variables, etc.
When your account is made in HPC systems, “dot-files” should be set up for user environment(default – bash shell). You can modify this “dot-files” to configure your environment firsthand. But, there is a way to set your environment up more conveniently.
You can modify your environment so that certain modules are loaded whenever you log in. To see which modules are loaded by default currently, type the following:
$ module initlist
If you want to load other modules automatically, type the following:
$ module initadd modulefile
If you want to remove loaded modules, type the following:
$ module initrm modulefile
Module commands
To know how to use environment module approach, type the following:
$ module help
“help” option displays as below.(not full result, select useful options)
Available SubCommands and Args: + add|load modulefile [modulefile ...] + rm|unload modulefile [modulefile ...] + switch|swap [modulefile1] modulefile2 + display|show modulefile [modulefile ...] + avail [modulefile [modulefile ...]] + purge + list
module list
prints a list of the currently loaded modulefile.
module avail
lists all the modulefiles which are available to be loaded.
module purge
unloads all loaded modulefiles currently.
module load modulefile
loads the modulefile.
module unload modulefile
unload the modulefile.
module switch modulefile_old modulefile_new
switches the modulefile_old with modulefile_new.
module show modulefile
displays how the modulefile changes the environment such as PATH, LD_LIBRARY_PATH, MANPATH, etc.