HPC/Module Setup: Difference between revisions

From CNM Wiki
< HPC
Jump to navigation Jump to search
Line 15: Line 15:
* tcsh only if you insist. It is not supported.  In fact: [http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ “csh programming considered harmful”] – [http://en.wikipedia.org/wiki/Tom_Christiansen Tom Christiansen]
* tcsh only if you insist. It is not supported.  In fact: [http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ “csh programming considered harmful”] – [http://en.wikipedia.org/wiki/Tom_Christiansen Tom Christiansen]


== Environment Modules ==
== Modules – Introduction ==


''Carbon'' uses the [http://modules.sourceforge.net/ Environment Modules] package to dynamically provision software.
''Carbon'' uses the [http://modules.sourceforge.net/ Environment Modules] package to dynamically provision software.
The package primarily modifies your $PATH and other environment variables.
The package primarily modifies your $PATH and other environment variables.


Modules introduction at other sites:
''Modules'' general introductions can be found at many other sites, such as:
** [http://www.nersc.gov/users/software/nersc-user-environment/modules/ NERSC]
** [http://www.nersc.gov/users/software/nersc-user-environment/modules/ NERSC]
** [http://core.sam.pitt.edu/node/71 PITT]
** [http://core.sam.pitt.edu/node/71 PITT]
Line 26: Line 26:


On Carbon:
On Carbon:
* [[HPC/Software/Catalog | Current module catalog]]
  $ '''module help'''
  $ '''module help'''
  …
  …
Line 46: Line 47:
  $ '''man module'''
  $ '''man module'''


* [[HPC/Software/Catalog | Current module catalog]]
== Module Conventions on Carbon ==
* Conventions on Carbon:
 
** Most application software is installed under <code>/opt/soft/</code>
* Most application software is installed under <code>'''/opt/soft/'''</code>
** '''Packages''' are located in top-level directories named <code>''name-version-build''</code>, e.g. <code>/opt/soft/jmol-12.1.37-1</code>.
* '''Packages''' are located in top-level directories named <code>''' ''name-version-build'' '''</code>, e.g. <code>/opt/soft/jmol-12.1.37-1</code>.
** '''Module names''' are organized by a mostly version-less name, with the version following after a slash: <code>''name/version-build''</code>. Using the <code>''name''</code> alone is possibly and will select a default version for a SubCommand to act upon.
* '''Module names''' are organized by a mostly version-less name, with the version following after a slash: <code>''' ''name/version-build'' '''</code>. Using the <code>''name''</code> alone is possible and will select a default version for a SubCommand to act upon.
* <code>module help</code> briefly describes a package and will usually contain a link to its home page.
$ '''module help jmol'''
----------- Module Specific Help for 'jmol/12.0.34-1' -------------
Jmol is a molecule viewer platform for researchers in chemistry and
biochemistry, implemented in Java for multi-platform use.  This is the
standalone application.  It offers high-performance 3D rendering with
no hardware requirements and supports many popular file formats.
http://jmol.sourceforge.net/
http://wiki.jmol.org/
* Most modules will set a convenience variable <code>''' ''NAME''_HOME'''</code> which points to the toplevel directory. This is mostly useful to inspect documentation and auxiliary files:
$ '''module load jmol'''
$ '''ls -l $JMOL_HOME/doc'''
total 488
-rw-r--r-- 1 stern stern 369786 Feb 25 12:59 CHANGES.txt
-rw-r--r-- 1 stern stern  2841 Feb 25 12:59 COPYRIGHT.txt
: … and to specifcy link paths in makefiles:
$ '''module load fftw3'''
 
LDFLAGS += -L'''$FFTW3_HOME'''/lib/

Revision as of 21:51, May 18, 2011

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 …

Modules – Introduction

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

Modules general introductions can be found at many other sites, such as:

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

Module 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 possible and will select a default version for a SubCommand to act upon.
  • module help briefly describes a package and will usually contain a link to its home page.
$ module help jmol

----------- Module Specific Help for 'jmol/12.0.34-1' -------------

	Jmol is a molecule viewer platform for researchers in chemistry and
	biochemistry, implemented in Java for multi-platform use.  This is the
	standalone application.  It offers high-performance 3D rendering with
	no hardware requirements and supports many popular file formats.

	http://jmol.sourceforge.net/
	http://wiki.jmol.org/
  • Most modules will set a convenience variable NAME_HOME which points to the toplevel directory. This is mostly useful to inspect documentation and auxiliary files:
$ module load jmol
$ ls -l $JMOL_HOME/doc
total 488
-rw-r--r-- 1 stern stern 369786 Feb 25 12:59 CHANGES.txt
-rw-r--r-- 1 stern stern   2841 Feb 25 12:59 COPYRIGHT.txt
…
… and to specifcy link paths in makefiles:
$ module load fftw3
LDFLAGS += -L$FFTW3_HOME/lib/