Tech:Open Source/Setup/Module

From Cyclopath

Jump to: navigation, search
up to: Tech:Open Source > Setup

Contents

[edit] Setup Modules

This document applies to core developers or developers without root access to their development machine.

[edit] Setup Modules

Copy the following to a new bash resource file called ~/.bashrc-cyclopath

# Activate addt'l software
if `module --version &>/dev/null`; then
 # Base CS loads
 module load soft/gcc java perl gnu local compilers system x11
 module load openwin modules Frame math/mathematica scheme user
 module load mozilla soft/openoffice soft/gimp
 # Cyclopath SVN client
 module load soft/subversion/1.5-latest
 # Python
 module load soft/python/2.7
 # GIS software
 module load soft/qgis
fi
NOTE You may have to
initadd
these modules once if you've never used them on your machine before. See below.

[edit] About Module

While you may not have sudo access to apt-get, you do have normal user access to the module command, which is used to load modules that CS has blessed, but that are not normally part of everyone's environment.

To see what modules are currently loaded, run

module list

To see what modules are available, run

module avail
When you've found a module you want,
module initadd
it from the command line, and then add a
module load
command to your bash startup script (i.e.,
~/.bashrc-cyclopath
). For instance, if you setup a new machine and try to SVN to the GroupLens SVN server, only to be told your SVN client is the wrong version, you may want to check your SVN version (
svn --version
) to see what version you're running. Then run
module avail 2>&1 | grep subv
(the
2>&1
is necessary because module avail dumps to stderr, not to stdout, and the pipe command just pipes stdout). Find the module with the correct name, and initadd it, e.g.,
module initadd soft/subversion/1.5-latest

Note that we're using "1.5-latest", which is a soft link, rather than a specific version, since all 1.5.x clients and all 1.5.x servers are compatible, and you want to be sure you're using the latest release.

Finally, add the
module load
command to your startup script (as shown above), e.g.,
module load soft/subversion/1.5-latest

[edit] Module Initadd

Do the following from your terminal. You should only need to do this once for your CS account; i.e., you shouldn't need to do this for every machine you setup.

module initadd soft/gcc java perl gnu local compilers system x11
module initadd openwin modules Frame math/mathematica scheme user
module initadd mozilla soft/openoffice soft/gimp
module initadd soft/subversion/1.5-latest
module initadd soft/qgis
Make sure your bash configuration script calls
module load
for each of these, as documented above.