Difference between revisions of "Bright:Modules Enviroment"
(Created page with "== Modules Environment == A module is a file used to set up the Paths in linux to allow the use of some software. The modules environment is a third party piece of software....") |
|||
| Line 27: | Line 27: | ||
== Using Local or Shared Modules == | == Using Local or Shared Modules == | ||
| + | Applications and their associated modules are divided into local and shared groups. Local applications are installed on the local file-system, whereas shared applications reside on a shared (i.e. imported) filesystem. | ||
| + | The shared module is loaded by default for ordinary users. Loading it gives access to the modules belonging to shared applications, and | ||
| + | allows the module avail command to show these extra modules. | ||
| + | Loading the shared module automatically for root is not recommended on a cluster where shared storage is not on the head node itself, because root logins could be obstructed if this storage is unavailable. The shared module is therefore not loaded by default for root. | ||
| + | |||
| + | On clusters without external shared storage, root can safely load the | ||
| + | shared module automatically at login. This can be done by running the | ||
| + | following command as root: | ||
| + | |||
| + | <syntaxhighlight> | ||
| + | module initadd shared | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | === Auto Loading Modules === | ||
| + | |||
| + | <syntaxhighlight> | ||
| + | module initadd <module name> | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | === Meta Modules === | ||
| + | |||
| + | Modules can be combined in meta-modules. By default, the default-environment meta-module exists, which allows the loading of several modules at once by a user. Cluster administrators are encouraged to customize the default-environment metamodule to set up a recommended environment for their users. The default-environment meta-module is empty by default. | ||
| + | |||
| + | The administrator and users have the flexibility of deciding the modules that should be loaded in undecided cases via module dependencies. Dependencies can be defined using the prereq and conflict commands. | ||
| + | The man page for modulefile gives details on configuring the loading of modules with these commands. | ||
== Creating a New Module == | == Creating a New Module == | ||
Revision as of 13:32, 27 February 2014
Modules Environment
A module is a file used to set up the Paths in linux to allow the use of some software. The modules environment is a third party piece of software.
Adding or Removing a Module
module list #List the currently loaded modules
module avail #List the available modules of loading
module load <module name 1> <module name 2>
As an example this would load the gcc, openmpi and openblas modules:
module add shared
module add gcc
module add openmpi/gcc
module add openblas/nehalem
mpicc -o myapp myapp.cApplications and their associated modules are divided into local and shared groups. Local applications are installed on the local file-system, whereas shared applications reside on a shared (i.e. imported) filesystem. The shared module is loaded by default for ordinary users. Loading it gives access to the modules belonging to shared applications, and allows the module avail command to show these extra modules.
Loading the shared module automatically for root is not recommended on a cluster where shared storage is not on the head node itself, because root logins could be obstructed if this storage is unavailable. The shared module is therefore not loaded by default for root.
On clusters without external shared storage, root can safely load the shared module automatically at login. This can be done by running the following command as root:
module initadd sharedAuto Loading Modules
module initadd <module name>Meta Modules
Modules can be combined in meta-modules. By default, the default-environment meta-module exists, which allows the loading of several modules at once by a user. Cluster administrators are encouraged to customize the default-environment metamodule to set up a recommended environment for their users. The default-environment meta-module is empty by default.
The administrator and users have the flexibility of deciding the modules that should be loaded in undecided cases via module dependencies. Dependencies can be defined using the prereq and conflict commands. The man page for modulefile gives details on configuring the loading of modules with these commands.