Mii: Difference between revisions
m (Added translation marker) |
(Marked this version for translation) |
||
Line 1: | Line 1: | ||
{{Draft}} | {{Draft}} | ||
<translate> | <translate> | ||
<!--T:1--> | |||
<languages /> | <languages /> | ||
A smart search engine for module environments. | A smart search engine for module environments. | ||
<!--T:2--> | |||
Mii works around an existing modules installation, efficiently searching and loading modules on-demand for users. | Mii works around an existing modules installation, efficiently searching and loading modules on-demand for users. | ||
<!--T:3--> | |||
Once Mii is loaded, modules will be quietly autoloaded for any unambiguous commands. Ambiguous commands will interactively ask for modules to load. | Once Mii is loaded, modules will be quietly autoloaded for any unambiguous commands. Ambiguous commands will interactively ask for modules to load. | ||
<!--T:4--> | |||
It features: | It features: | ||
* Support for Lmod and Environment Modules installations | * Support for Lmod and Environment Modules installations | ||
Line 16: | Line 20: | ||
* Optional JSON export format | * Optional JSON export format | ||
<!--T:5--> | |||
{{Callout | {{Callout | ||
|title=Important note | |title=Important note | ||
Line 22: | Line 27: | ||
}} | }} | ||
= Activating Mii = | = Activating Mii = <!--T:6--> | ||
To enable/load mii: | To enable/load mii: | ||
{{Command | {{Command | ||
Line 28: | Line 33: | ||
}} | }} | ||
<!--T:7--> | |||
Once Mii is loaded, it will start making suggestion. When a command is not found, for example: | Once Mii is loaded, it will start making suggestion. When a command is not found, for example: | ||
{{Command | {{Command | ||
Line 35: | Line 41: | ||
}} | }} | ||
= Unambiguous commands = | = Unambiguous commands = <!--T:8--> | ||
When a command or binary is known and unambiguous, it will be autoloaded: | When a command or binary is known and unambiguous, it will be autoloaded: | ||
{{Command | {{Command | ||
Line 44: | Line 50: | ||
}} | }} | ||
= Ambiguous commands = | = Ambiguous commands = <!--T:9--> | ||
When a command or binary is unknown or ambiguous, it will suggest a selection of potential candidates based on their relevance: | When a command or binary is unknown or ambiguous, it will suggest a selection of potential candidates based on their relevance: | ||
<!--T:10--> | |||
{{Command | {{Command | ||
|blastn -version | |blastn -version | ||
Line 73: | Line 80: | ||
[mii] loading StdEnv/2020 gcc/9.3.0 blast+/2.12.0 ... | [mii] loading StdEnv/2020 gcc/9.3.0 blast+/2.12.0 ... | ||
<!--T:11--> | |||
Lmod is automatically replacing "intel/2020.1.217" with "gcc/9.3.0". | Lmod is automatically replacing "intel/2020.1.217" with "gcc/9.3.0". | ||
<!--T:12--> | |||
Due to MODULEPATH changes, the following have been reloaded: | Due to MODULEPATH changes, the following have been reloaded: | ||
1) openmpi/4.0.3 | 1) openmpi/4.0.3 | ||
<!--T:13--> | |||
blastn: 2.12.0+ | blastn: 2.12.0+ | ||
Package: blast 2.12.0, build Sep 27 2021 15:23:34 | Package: blast 2.12.0, build Sep 27 2021 15:23:34 | ||
Line 84: | Line 94: | ||
As shown above, we selected one module (#1) out of the selection, and the command was then ran. | As shown above, we selected one module (#1) out of the selection, and the command was then ran. | ||
= Search with Mii = | = Search with Mii = <!--T:14--> | ||
You can search for binaries to discover which modules provides it. The results are sorted by relevance: | You can search for binaries to discover which modules provides it. The results are sorted by relevance: | ||
{{Command | {{Command | ||
Line 109: | Line 119: | ||
}} | }} | ||
= Disabling Mii = | = Disabling Mii = <!--T:15--> | ||
To disable mii: | To disable mii: | ||
{{Command | {{Command | ||
Line 115: | Line 125: | ||
}} | }} | ||
== Re-enabling == | == Re-enabling == <!--T:16--> | ||
To re-enable mii: | To re-enable mii: | ||
{{Command | {{Command |
Revision as of 12:58, 30 September 2021
This is not a complete article: This is a draft, a work in progress that is intended to be published into an article, which may or may not be ready for inclusion in the main wiki. It should not necessarily be considered factual or authoritative.
A smart search engine for module environments.
Mii works around an existing modules installation, efficiently searching and loading modules on-demand for users.
Once Mii is loaded, modules will be quietly autoloaded for any unambiguous commands. Ambiguous commands will interactively ask for modules to load.
It features:
- Support for Lmod and Environment Modules installations
- bash and zsh shell integration
- Module listing / individual information (via mii list, mii show)
- Searching for exact commands
- Searching for similar commands
- Optional JSON export format
A module that is autoloaded does not persist after the command. The shell environment will be the same as it was before mii autoloaded a module.
Activating Mii
To enable/load mii:
[name@server ~]$ module load mii
Once Mii is loaded, it will start making suggestion. When a command is not found, for example:
[name@server ~]$ cmd
[mii] cmd not found! Similar commands: "cmp", "cmp", "dcmd"
Unambiguous commands
When a command or binary is known and unambiguous, it will be autoloaded:
[name@server ~]$ python3.9 --version
[mii] loading StdEnv/2020 python/3.9.6 ...
Python 3.9.6
Ambiguous commands
When a command or binary is unknown or ambiguous, it will suggest a selection of potential candidates based on their relevance:
[name@server ~]$ blastn -version
[mii] Please select a module to run blastn:
MODULE PARENT(S)
1 blast+/2.12.0 StdEnv/2020 gcc/9.3.0
2 blast+/2.11.0 StdEnv/2020 gcc/9.3.0
3 blast+/2.10.1 StdEnv/2020 gcc/9.3.0
4 rmblast/2.10.0 StdEnv/2020 gcc/9.3.0
5 blast+/2.10.1 nixpkgs/16.09 gcc/7.3.0
6 blast+/2.10.0 nixpkgs/16.09 gcc/7.3.0
7 blast+/2.9.0 nixpkgs/16.09 gcc/7.3.0
8 blast+/2.8.1 nixpkgs/16.09 gcc/7.3.0
9 blast+/2.7.1 nixpkgs/16.09 gcc/7.3.0
10 blast+/2.4.0 nixpkgs/16.09 gcc/7.3.0
11 igblast/1.9.0 nixpkgs/16.09 gcc/7.3.0
12 rmblast/2.9.0 nixpkgs/16.09 gcc/7.3.0
13 blast+/2.6.0 nixpkgs/16.09 gcc/5.4.0
14 igblast/1.9.0 nixpkgs/16.09 gcc/5.4.0
15 igblast/1.8.0 nixpkgs/16.09 gcc/5.4.0
16 igblast/1.7.0 nixpkgs/16.09 gcc/5.4.0
17 rmblast/2.6.0 nixpkgs/16.09 gcc/5.4.0
18 igblast/1.8.0 nixpkgs/16.09 gcc/4.8.5
Make a selection (1-18, q aborts) [1]: 1
[mii] loading StdEnv/2020 gcc/9.3.0 blast+/2.12.0 ...
Lmod is automatically replacing "intel/2020.1.217" with "gcc/9.3.0".
Due to MODULEPATH changes, the following have been reloaded:
1) openmpi/4.0.3
blastn: 2.12.0+
Package: blast 2.12.0, build Sep 27 2021 15:23:34
As shown above, we selected one module (#1) out of the selection, and the command was then ran.
Search with Mii
You can search for binaries to discover which modules provides it. The results are sorted by relevance:
[name@server ~]$ mii search pgc+
Results for "pgc+": (total 16)
MODULE COMMAND PARENT(S) RELEVANCE
nvhpc/20.7 pgcc StdEnv/2020 high
nvhpc/20.7 pgc++ StdEnv/2020 high
pgi/19.4 pgcc nixpkgs/16.09 high
pgi/19.4 pgc++ nixpkgs/16.09 high
pgi/17.3 pgc nixpkgs/16.09 high
pgi/17.3 pgcc nixpkgs/16.09 high
pgi/17.3 pgc++ nixpkgs/16.09 high
pgi/16.9 pgc nixpkgs/16.09 high
pgi/16.9 pgcc nixpkgs/16.09 high
pgi/16.9 pgc++ nixpkgs/16.09 high
pgi/13.10 pgc nixpkgs/16.09 high
pgi/13.10 pgcc nixpkgs/16.09 high
pgi/13.10 pgc++ nixpkgs/16.09 high
pgi/13.10 pgCC nixpkgs/16.09 high
gcccore/.9.3.0 gcc StdEnv/2020 medium
gcccore/.9.3.0 g++ StdEnv/2020 medium
Disabling Mii
To disable mii:
[name@server ~]$ mii disable
Re-enabling
To re-enable mii:
[name@server ~]$ mii enable