module load / unload command (Envrionment modules tool)

Envrionment modules tool used to quickly set up and modify user environment compile and run.

Envrionment modules can directly change the user environment variables by loading and unloading modulefile files, users do not need to modify .bashrc, so as to avoid misuse.  

 

Use module to manage compiler version library functions , commonly used commands are as follows:

 

1. module load | add environment variables loaded

As in the linux VCS loading and environment variables are Verdi

% Module load vcs / 2015.09 # (load VCS)

% Which vcs # (to see if loaded successfully)

The results /tool/cbar/apps/vcs-mx/2015.09-SP2-T0315/bin/vcs

 

% Module load verdi / 2014.12 # (load Verdi)

% Which verdi # (to see if loaded successfully)

The results /tool/cbar/apps/verdi/2014.03/bin/verdi

 

2. module switch to change the environment variable version number

If you want to switch the loaded module version, use the command module switch

% Module load vcs / 2012.09 # (load VCS)

% Which vcs # (see the version number has changed successfully)

The results /tool/cbar/apps/vcs-mx/2012.09-SP2-T0315/bin/vcs

 

3.1 module unload | rm unload environment variables

3.2 module swap replace an environment variable

Sometimes there will be a version conflict modules, for example, in the case of already loaded vcs version of the trying to load another version 2015.09, just loaded version 2012.09, then error. If you want to use the latest compiler should be used as command

% module unload vcs

% module load vcs/2015.09

Or more efficient way

% module swap vcs vcs/2015.09

 

4. module avail - display systems and library available compilers

 

5. module list displayed and the user loads the library compiler

 

6. module help help command

 

 

 

 

Guess you like

Origin blog.csdn.net/l471094842/article/details/90728411