Print this article Edit this article
Lmod on Linux Hosts
If you can't find an application on an ECN supported Linux host try using the Lmod environment module system.
module avail
This command will show you the software available for loading using Lmod.
You will see something like:
------------------------------- /etc/modulefiles -------------------------------
mpi/mpich-x86_64 mpi/mpich-3.2-x86_64 pkg/python3/3.7.4
mpi/mpich-3.0-x86_64 mpi/openmpi3-x86_64 (D)
----------------------------- /etc/modulefiles/pkg -----------------------------
python3/3.7.4
----------------------- /package/modulefiles/ecn/common ------------------------
comsol/4.3b gurobi/8.0.1 matlab/R2019a
comsol/5.2a intel/16.0.3 matlab/R2019b (D)
comsol/5.3a intel/18.0.1 (D) pointwise/18.3R1
comsol/5.3 maple/2019 tecplot-360/2018R1.1
comsol/5.4 mathematica/12.0 tecplot-rs/2017R1
comsol/5.5 (D) matlab/R2015a thermocalc/2018b
cplex/12.9 matlab/R2017a
gams/27.2.0 matlab/R2018b
----------------------- /package/modulefiles/ecn/centos ------------------------
abaqus/2019 ansys/2020R1 gcc/5.3.0
ansys/15.0.7 ansysedt/19.0 gcc/6.3.0
ansys/19.0 ansysedt/2019R2 (D) gcc/7.1.0
ansys/2019R2 (D) ansysedt/2019R3 gcc/8.3.0 (D)
ansys/2019R3 ansysedt/2020R1 texlive/2019
Where:
D: Default Module
By default, no modules are loaded at login or when a terminal/console/shell is opened.
To then be able to use a specific application
module load matlab
This will load the default version of Matlab. Those are noted by the (D) next to them in the module avail command.
You can also load a specific version of an application, too.
module load matlab/R2015a
This will unload the version of matlab currently loaded if it is not R2015a.
NOTE: loading a module does not start that associated software. It only modifies your environment so you can then run the associated command(s) for that software.
Also, lmod modifies your shell environment. Previously you might have used an explicit path to run matlab like:
/usr/opt/bin/matlab -nodisplay < my_run.m
This is a perfectly reasonable and excellent way to do things. However, there is no /usr/opt/bin on systems that use lmod.
Instead you can just do:
matlab -nodisplay < my_run.m
You could use an explicit path for a program by doing something like:
which matlab
However, that path might change over time so we would recommend against it. At least on hosts using lmod.
Check this page if you have problems with lmd commands not being found.
More information about Lmod itself can be found at
https://lmod.readthedocs.io/en/latest/
Last Modified:
May 18, 2020 2:31 pm America/New_York
Created:
Jan 16, 2020 10:49 am US/Eastern
by
admin
JumpURL: https://eng.purdue.edu/jump/2e2bca1