How do I search for which environment modules are available?
You can use either module avail matlab or module spider matlab, as discussed in the other posts. Also note, thanks to the node from @mk42 that module spider
is not available with Environment Modules. From the Lmod page, you can quickly understand the difference:
The module spider command is reports all the modules that can be loaded on a system. In a flat module layout system, the module avail and module spider return similar information. In a hierarchical system, module spider returns all the modules that are possible where as module avail only reports modules that can be loaded directly.
So my preference tends to be for spider, because I want to know all possible. And spider is more fun a command to type They return slightly different output, and I’ll show the differences:
$ module spider matlab
----------------------------------------------------------------------------
matlab:
----------------------------------------------------------------------------
Description:
MATLAB (matrix laboratory) is a multi-paradigm numerical computing
environment and fourth-generation programming language.
Versions:
matlab/R2017a
matlab/R2017b
matlab/R2018a
----------------------------------------------------------------------------
For detailed information about a specific "matlab" module (including how to load the modules) use the module's full name.
For example:
$ module spider matlab/R2018a
----------------------------------------------------------------------------
module spider matlab shows you the specific versions of matlab available, and how to ask for more details for one. For example:
$ module spider matlab/R2018a
----------------------------------------------------------------------------
matlab: matlab/R2018a
----------------------------------------------------------------------------
Description:
MATLAB (matrix laboratory) is a multi-paradigm numerical computing
environment and fourth-generation programming language.
Properties:
Restricted access
You will need to load all module(s) on any one of the lines below before the "matlab/R2018a" module is available to load.
math
module avail on the other hand will do a good job to show you (almost the same) information but in a different format, and whether you have access or not (restricted).
$ module avail matlab
--- math -- numerical libraries, statistics, deep-learning, computer science ---
matlab/R2017a (r) matlab/R2017b (r) matlab/R2018a (r,D)
Where:
D: Default Module
r: Restricted access
>> For more information about using software on Sherlock, please refer to
>> https://www.sherlock.stanford.edu/docs/software
I suspect you would see different output depending on the cluster, and you may have preference for one or the other in terms of formatting.
Assuming you are talking about Environment Modules (or the newer Lmod)
Easiest way is to use the following command (note this will list all available modules)
module avail
To refine it further (note that Environment Modules is case sensitive by default):
module avail MATLAB
With environment modules, module avail <modulename>
only matches from the front of the target module, for more general search pipe to grep ex. module avail 2>&1 | grep <searchterm>
As a supplement to @mhanby’s answer: while module avail
will show you all the modules that are currently available to the module command, some sites have their module trees set up so that modules only become visible/available once you’ve loaded their pre-requisites.
In these cases you may have to find the module tree directory where the modulefiles are stored, and search it manually.