Difference between revisions of "Isolating shell environments"

From Helpful
Jump to: navigation, search
m
m (Intro)
Line 30: Line 30:
  
 
-->
 
-->
 +
 +
 +
==By example==
 +
<!--
 +
 +
 +
The system-configured modules are often in a place like:
 +
/usr/share/modules/modulefiles
 +
 +
 +
A little more fully:
 +
 +
First, find where modules can be added. What the commands actually look at is the contents of MODULEPATH environment variable.
 +
 +
 +
Its entries come from:
 +
* a system-configured list, found in modulespath (e.g. at /etc/environment-modules/modulespath),
 +
: each entry will be added to MODULEPATH
 +
 +
* {{inlinecode|module use}} prepends to MODULEPATH and is usually used by users wanting to add their personal modules, often like {{inlinecode|module use $HOME/modulefiles}}
 +
 +
 +
 +
A module file looks like:
 +
<code lang="bash">
 +
#%Module1.0#####################################################################
 +
##
 +
## modules compilers/gcc-4.6.2
 +
##
 +
proc ModulesHelp { } {
 +
        puts stderr "compilers/gcc-4.6.2 - sets the Environment for GCC 4.6.2 in my home directory"
 +
}
 +
 +
module-whatis  "gcc-4.6.2 compiler suite"
 +
 +
# for Tcl script use only
 +
set    topdir          /home/me/bin/gcc-4.6.2
 +
set    version        4.6.2
 +
set    sys            linux86
 +
 +
setenv          CC              $topdir/bin/gcc
 +
setenv          GCC            $topdir/bin/gcc
 +
setenv          FC              $topdir/bin/gfortran
 +
setenv          F77            $topdir/bin/gfortran
 +
setenv          F90            $topdir/bin/gfortran
 +
prepend-path    PATH            $topdir/include
 +
prepend-path    PATH            $topdir/bin
 +
prepend-path    MANPATH        $topdir/man
 +
prepend-path    LD_LIBRARY_PATH $topdir/lib
 +
</code>
 +
 +
 +
 +
 +
http://www.admin-magazine.com/HPC/Articles/Environment-Modules
 +
 +
-->
 +
 
==setting up==
 
==setting up==
  

Revision as of 16:48, 15 August 2019

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Intro

By example

setting up

using

writing module files

Technical

See also