HPC/Module Setup

From CNM Wiki
Jump to navigation Jump to search

Shell startup files

  • The default login shell on Carbon is bash
  • Place customizations in the file ~/.bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

export PATH=$HOME/mypackage/bin:$PATH
module load name1 name2 …

Environment Modules

Carbon uses the Environment Modules package to dynamically provision software. The package primarily modifies your $PATH and other environment variables.

Modules introduction at other sites:

On Carbon:

$ module help
…
  Usage: module [ switches ] [ subcommand ] [subcommand-args ]
…

  Available SubCommands and Args:

+ load		modulefile [modulefile ...]
+ unload	modulefile [modulefile ...]
+ switch	[modulefile1] modulefile2.]
+ list

+ avail		[modulefile [modulefile ...]]
+ whatis	[modulefile [modulefile ...]]
+ help		[modulefile [modulefile ...]]
+ show		modulefile [modulefile ..]

For full documentation, consult the manual page:

$ man module
  • Current module catalog
  • Conventions on Carbon:
    • Most application software is installed under /opt/soft/
    • Packages are located in top-level directories named name-version-build, e.g. /opt/soft/jmol-12.1.37-1.
    • Module names are organized by a mostly version-less name, with the version following after a slash: name/version-build. Using the name alone is possibly and will select a default version for a SubCommand to act upon.