35,879
edits
No edit summary |
(Updating to match new version of source page) |
||
Line 13: | Line 13: | ||
{{Command|module help}} | {{Command|module help}} | ||
<div class="mw-translate-fuzzy"> | |||
== Sub-command <code>spider</code> (Lmod only) == | == Sub-command <code>spider</code> (Lmod only) == | ||
The <code>spider</code> sub-command searches the complete tree of all modules and displays it. | The <code>spider</code> sub-command searches the complete tree of all modules and displays it. | ||
{{Command|module spider}} | {{Command|module spider}} | ||
</div> | |||
If you specify the name of an application, for example with | If you specify the name of an application, for example with | ||
Line 21: | Line 23: | ||
this will show you a list of all available versions of the application. | this will show you a list of all available versions of the application. | ||
<div class="mw-translate-fuzzy"> | |||
If you specify the name of the application along with a version number, for example with | If you specify the name of the application along with a version number, for example with | ||
{{Command|module spider openmpi/1.8.4}} | {{Command|module spider openmpi/1.8.4}} | ||
this will display a list of the modules you must load in order to access this version. | this will display a list of the modules you must load in order to access this version. | ||
</div> | |||
== Sub-command <code>avail</code> == | == Sub-command <code>avail</code> == | ||
Line 39: | Line 43: | ||
{{Command|module list}} | {{Command|module list}} | ||
<div class="mw-translate-fuzzy"> | |||
== Sub-command <code>load</code> == | == Sub-command <code>load</code> == | ||
The sub-command <code>load</code> lets you load a given module. For example, | The sub-command <code>load</code> lets you load a given module. For example, | ||
{{Command|module load gcc/4.8}} | {{Command|module load gcc/4.8}} | ||
could let you access the GCC compilers, version 4.8. | could let you access the GCC compilers, version 4.8. | ||
</div> | |||
<div class="mw-translate-fuzzy"> | |||
You can load more than one module with a single command. For example, | You can load more than one module with a single command. For example, | ||
{{Command|module load gcc/4.8 mpi/openmpi/1.8.4}} | {{Command|module load gcc/4.8 mpi/openmpi/1.8.4}} | ||
will load at the same time the GCC 4.8 compilers and the Open MPI library 1.8.4, compiled for GCC. | will load at the same time the GCC 4.8 compilers and the Open MPI library 1.8.4, compiled for GCC. | ||
</div> | |||
If you load a module that is incompatible with one you already have loaded, Lmod will tell you that it has replaced the old module with a new one. This can occur especially for compilers and MPI implementations. | If you load a module that is incompatible with one you already have loaded, Lmod will tell you that it has replaced the old module with a new one. This can occur especially for compilers and MPI implementations. | ||
<div class="mw-translate-fuzzy"> | |||
== Sub-command <code>unload</code> == | == Sub-command <code>unload</code> == | ||
After the <code>load</code> sub-command, <code>unload</code> removes a module from your environment. For example, | After the <code>load</code> sub-command, <code>unload</code> removes a module from your environment. For example, | ||
{{Command|module unload gcc/4.8}} | {{Command|module unload gcc/4.8}} | ||
would remove the GCC 4.8 compilers from your environment. | would remove the GCC 4.8 compilers from your environment. | ||
</div> | |||
If you have other modules loaded that depend on this compiler, Lmod will tell you that they have been disabled. | If you have other modules loaded that depend on this compiler, Lmod will tell you that they have been disabled. | ||
Line 62: | Line 72: | ||
Some modules may be marked "sticky" (permanent) by system administrators. These will not be unloaded. | Some modules may be marked "sticky" (permanent) by system administrators. These will not be unloaded. | ||
<div class="mw-translate-fuzzy"> | |||
== Sub-commands <code>show, help</code> and <code>whatis</code> == | == Sub-commands <code>show, help</code> and <code>whatis</code> == | ||
The sub-commands <code>show, help</code> and <code>whatis</code> provide additional information about a given module. The <code>show</code> sub-command displays the entire module, <code>help</code> displays a help message, and <code>whatis</code> shows a description of the module. | The sub-commands <code>show, help</code> and <code>whatis</code> provide additional information about a given module. The <code>show</code> sub-command displays the entire module, <code>help</code> displays a help message, and <code>whatis</code> shows a description of the module. | ||
</div> | |||
== Sub-command <code>apropos</code> or <code>keyword</code> == | == Sub-command <code>apropos</code> or <code>keyword</code> == | ||
Line 71: | Line 83: | ||
'''We advise against loading modules automatically in your .bashrc.''' Instead we recommend that you load modules only when required, for example in your job scripts. To facilitate the repeated loading of a large number of modules we recommend you use a module collection. | '''We advise against loading modules automatically in your .bashrc.''' Instead we recommend that you load modules only when required, for example in your job scripts. To facilitate the repeated loading of a large number of modules we recommend you use a module collection. | ||
<div class="mw-translate-fuzzy"> | |||
= Module collections (Lmod only) = | = Module collections (Lmod only) = | ||
Lmod allows you to create a collection of modules. To do so, first load the desired modules. For example: | Lmod allows you to create a collection of modules. To do so, first load the desired modules. For example: | ||
{{Command|module load gcc/4.8 openmpi/1.8 mkl}} | {{Command|module load gcc/4.8 openmpi/1.8 mkl}} | ||
</div> | |||
Then use the <code>save</code> sub-command to save this collection: | Then use the <code>save</code> sub-command to save this collection: | ||
Line 85: | Line 99: | ||
Some modules are hidden. You may ignore them. They are typically modules that you don't have to load manually. They are loaded automatically based on other modules. | Some modules are hidden. You may ignore them. They are typically modules that you don't have to load manually. They are loaded automatically based on other modules. | ||
= | <div class="mw-translate-fuzzy"> | ||
== Module hierarchy == | == Module hierarchy == | ||
Most systems use a flat module structure: All modules are at the same level. This becomes problematic when many combinations of versions of different modules are available on a system. For example, if you need to use the [[FFTW]] library and the module <code>fftw</code> is available in several versions, including a version compiled with GCC 4.8 and Open MPI 1.6, you might see modules named <code>openmpi/1.6_gcc4.8</code> and <code>fftw/3.3_gcc4.8_openmpi1.6</code>. This is neither elegant nor practical. To solve this problem we use a hierarchy of modules. Rather than using the command | Most systems use a flat module structure: All modules are at the same level. This becomes problematic when many combinations of versions of different modules are available on a system. For example, if you need to use the [[FFTW]] library and the module <code>fftw</code> is available in several versions, including a version compiled with GCC 4.8 and Open MPI 1.6, you might see modules named <code>openmpi/1.6_gcc4.8</code> and <code>fftw/3.3_gcc4.8_openmpi1.6</code>. This is neither elegant nor practical. To solve this problem we use a hierarchy of modules. Rather than using the command | ||
Line 93: | Line 105: | ||
you instead use | you instead use | ||
{{Command|module load gcc/4.8 openmpi/1.6 fftw/3.3}} | {{Command|module load gcc/4.8 openmpi/1.6 fftw/3.3}} | ||
This is made possible by using a module hierarchy. The <code>fftw/3.3</code> module that is loaded will not be the same one that would be loaded if you had previously loaded the Intel compilers instead of GCC. | This is made possible by using a module hierarchy. The <code>fftw/3.3</code> module that is loaded will not be the same one that would be loaded if you had previously loaded the Intel compilers instead of GCC. | ||
</div> | |||
<div class="mw-translate-fuzzy"> | |||
The inconvenience of using a module hierarchy is that, since modules can have the same name, only the modules that are compatible with the "parent" modules are displayed by the <code>module avail</code> command. Loading a parent module is therefore a prerequisite to loading some modules. To get complete information, Lmod provides the <code>module spider</code> command. It scans the entire hierarchy and displays all the modules. By specifying a module and a particular version, it is then possible to see which paths in the hierarchy enable the desired module to be loaded. | The inconvenience of using a module hierarchy is that, since modules can have the same name, only the modules that are compatible with the "parent" modules are displayed by the <code>module avail</code> command. Loading a parent module is therefore a prerequisite to loading some modules. To get complete information, Lmod provides the <code>module spider</code> command. It scans the entire hierarchy and displays all the modules. By specifying a module and a particular version, it is then possible to see which paths in the hierarchy enable the desired module to be loaded. | ||
</div> | |||
= | <div class="mw-translate-fuzzy"> | ||
== Automatic replacement of modules == | == Automatic replacement of modules == | ||
When Lmod detects two modules of the same family, or two version of the same module, the command <code>module load</code> will automatically replace the original module with the one to be loaded. In the cases where the replaced module is a node in the module hierarchy, dependent modules will be reloaded if there are compatible versions, or deactivated otherwise. | When Lmod detects two modules of the same family, or two version of the same module, the command <code>module load</code> will automatically replace the original module with the one to be loaded. In the cases where the replaced module is a node in the module hierarchy, dependent modules will be reloaded if there are compatible versions, or deactivated otherwise. | ||
</div> | |||
= Creating modules = | = Creating modules = |