Home

modulefiles

Modulefiles are scripts used by the Environment Modules package to manage user environments on shared computing systems. They provide a mechanism to switch between different software packages and versions by applying environment changes when a module is loaded. A module load operation typically modifies PATH, LD_LIBRARY_PATH, MANPATH, and other variables, allowing multiple toolchains to coexist without conflicts.

Modulefiles are stored in directories referenced by MODULEPATH. Each modulefile defines changes via commands such as

Users interact with a module command family: module avail lists loadable modules, module load name/version loads

setenv,
prepend-path,
append-path,
and
dependencies
like
depends
or
prereq.
Modulefiles
can
be
written
in
Tcl
for
the
original
Modules,
or
in
Lua
for
Lmod.
They
may
include
help
text
and
metadata,
and
may
declare
conflicts
or
prerequisites
to
control
loading
behavior.
it,
module
list
shows
current
loaded
modules,
module
show
name
previews
the
changes.
The
module
system
is
widely
used
in
HPC
clusters
and
data
centers
to
simplify
software
stacks
and
improve
reproducibility.
Variants
such
as
Lmod
provide
more
scalable,
lazy-loading
and
Python-friendly
features,
while
classic
Environment
Modules
use
Tcl-based
modulefiles.