The LRZ version of modules is slightly modified with respect to the original, especially with respect to the initialization functionality. There a two parts to the modules package:
A RPM package to be installed on every node. Automatic setup at login is performed via
The configuration which is installed in the globally accessible /lrz/sys/share/modules directory (MODULESHOME). The MODULEPATH variable by default contains references to the LRZ module classes defined in the main article. A module class will in the following occasionally be referred to as <class>.
All configuration data with exception of the extfiles area will be completely overwritten by the installation procedure which is performed from the SVN-generated LRZ modules source tree.
(check XXX_VERSION set consistently)
module unload xxx
export XXX_VERSION=(new version)
module load xxx
prepend-path VAR value " "
set COMPONENT xyz source "[exec dirname $env(MODULE_BIN)]/modulefile-already-loaded.tcl"
#%Module # LRZ HPC user environment # DEISA Common Production Environment # # Author : wrzlprmft@lrz.de # Created : Wed Jul 11 2012 # set DIRECTORY "/lrz/sys/<class>/pac" set VERSION 1.3_build2 # version and architecture independent part in common include file source $env(MODULE_INCLUDE)/whatever/pac.tcl # the following line only if DEISA enablement required. source $env(MODULE_INCLUDE)/whatever/deisa_pac.tcl |
# LRZ HPC user environment
# DEISA Common Production Environment
#
# Author : wrzlprmft@lrz.de
# created : Wed Jul 11 2012
#
# needs Tcl internal variables
# DIRECTORY base directory
# VERSION version subdirectory
# WWWDoc LRZ WWW server documentation
set WWWDoc "http://www.lrz-muenchen.de/services/software/whatever/pac"
module-whatis "Enable usage of PAC application software"
# TMPDIR needed for scratch files
prereq tempdir
# Only one version at a time
conflict pac
# Note: can also have prereq and conflict lines in module file if necessary
# need to be member of group "pac" to use
set groups [ exec groups $env(USER) ]
if { [ lsearch -exact $groups pac ] == -1 && [module-info mode] == "load" } {
puts stderr "Your account is not in the UNIX group pac.
Please contact LRZ support to have it entered. Aborting module load."
break
}
# Tcl internal settings of e.g. PAC_SHLIB required for DEISA setup
set DIR "${DIRECTORY}/${VERSION}"
setenv PAC_BASE "$DIR"
setenv PAC_LIBDIR "${DIR}/lib"
setenv PAC_INC "-I${DIR}/include"
set PAC_LIB "${DIR}/lib/libpac.a"
setenv PAC_LIB "$PAC_LIB"
set PAC_SHLIB "-L${DIR}/lib/ -lpac"
setenv PAC_SHLIB "$PAC_SHLIB"
setenv PAC_DOC "${DIR}/docs"
setenv PAC_WWW "$WWWDoc"
setenv PAC_SRC "/lrz/noarch/src/PAC"
setenv PAC_INSTALL_DOC "/lrz/noarch/src/PAC/REAMDE_lrz"
prepend-path LD_LIBRARY_PATH "${DIR}/lib"
prepend-path PATH "${DIR}/bin"
prepend-path MANPATH "${DIR}/man"
prepend-path INFOPATH "${DIR}/info"
# make application usage profile entry
# (do not use for very heavily used stuff like compilers)
if { [module-info mode] == "load" } {
exec /usr/bin/application-control pac $VERSION $env(HOSTNAME)
}
proc ModulesHelp {} {
global WWWDoc
puts stderr "
Enable the usage of PAC application software.
Documentation on LRZ Web Server at
$WWWDoc."
return 0
}
|
#
# enable DEISA settings for pac
# requires the PAC_SHLIB internal Tcl variable
#
if { "[ lindex [ array get env DEISA_ENV ] end ]" == "yes" } {
if { $env(DEISA_NOCOMPILER_WRAPPERS) == 1 } {
setenv DEISA_PAC_LDFLAGS "$PAC_SHLIB"
}
prepend-path DEISA_LDFLAGS "$PAC_SHLIB" " "
}
|
#%Module # LRZ HPC user environment # DEISA Common Production Environment ## ## default version ## set ModulesVersion "1.3" |
cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/modules login (empty password) cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/modules co modules (first checkout, after this updates in base directory should be OK).