Mii: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
m (Added translation marker)
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Draft}}
<languages />
<translate>
<translate>
<languages />
<!--T:1-->
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
* bash and zsh shell integration
* bash and zsh shell integration
* Module listing / individual information (via <tt>mii list</tt>, <tt>mii show</tt>)
* Module listing / individual information (via <tt>mii list</tt>, <tt>mii show</tt>)
* Searching for exact commands
* Searching for exact commands (via <tt>mii exact</tt>)
* Searching for similar commands
* Searching for similar commands (via <tt>mii search</tt>)
* Optional JSON export format
* Optional JSON export format


<!--T:5-->
{{Callout
{{Callout
   |title=Important note
   |title=Important note
Line 22: Line 26:
}}
}}


= Activating Mii =
= Activating Mii = <!--T:6-->
To enable/load mii:
To enable/load mii:
{{Command
{{Command
Line 28: Line 32:
}}
}}


<!--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
|cmd
|cmd
|result=
|result=
[mii] cmd not found! Similar commands: "cmp", "cmp", "dcmd"
[mii] cmd not found! Similar commands: "xcmd", "vmd", "c2d"
}}
}}


= 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 49:
}}
}}


= 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 79:
[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 93:
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 118:
}}
}}


= Disabling Mii =
= Disabling Mii = <!--T:15-->
To disable mii:
To disable mii:
{{Command
{{Command
Line 115: Line 124:
}}
}}


== Re-enabling ==
== Re-enabling == <!--T:16-->
To re-enable mii:
To re-enable mii:
{{Command
{{Command

Latest revision as of 13:52, 18 October 2021

Other languages:

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 (via mii exact)
  • Searching for similar commands (via mii search)
  • Optional JSON export format


Important note

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:

Question.png
[name@server ~]$ module load mii

Once Mii is loaded, it will start making suggestion. When a command is not found, for example:

Question.png
[name@server ~]$ cmd
[mii] cmd not found! Similar commands: "xcmd", "vmd", "c2d"

Unambiguous commands

When a command or binary is known and unambiguous, it will be autoloaded:

Question.png
[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:

Question.png
[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:

Question.png
[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:

Question.png
[name@server ~]$ mii disable

Re-enabling

To re-enable mii:

Question.png
[name@server ~]$ mii enable