Difference: EnvironmentModules (3 vs. 4)

Revision 42015-02-06 - WilliamSeligman

Line: 1 to 1
 
META TOPICPARENT name="Computing"

Environment modules on the Nevis particle-physics Linux cluster

Line: 42 to 42
 

What are environment modules?

Changed:
<
<
The command line environment you use to issue commands in Linux is called the shell. Your shell has an "environment": a collection of variables, aliases, and definitions to make the shell easier to use. A software package that is not built-in to Linux (such as ROOT or Geant4) needs the shell environment to be set up in various ways: defining shell variables such as $ROOTSYS, adding binary executables to the shell's search path variable $PATH, adding library locations to the shell's library search variable $LD_LIBRARY_PATH, etc.
>
>
The command-line environment you use to issue commands in Linux is called the shell. Your shell has an "environment": a collection of variables, aliases, and definitions to make the shell easier to use. A software package that is not built-in to Linux (such as ROOT or Geant4) needs the shell environment to be set up in various ways: defining shell variables such as $ROOTSYS, adding binary executables to the shell's search path variable $PATH, adding library locations to the shell's library search variable $LD_LIBRARY_PATH, etc.
  Environment modules are a way taking care of these details for you. Instead of having to type something like:
Changed:
<
<
export ROOTSYS=/usr/nevis/ROOT-5.34.23
>
>
export ROOTSYS=/usr/nevis/ROOT-05.34.23
 export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
Line: 58 to 58
  Another advantage of environment modules is that they are shell-independent. For example, the above export commands are valid in bash and zsh, but in csh you must use:
Changed:
<
<
setenv ROOTSYS /usr/nevis/ROOT-5.34.23
>
>
setenv ROOTSYS /usr/nevis/ROOT-05.34.23
 setenv PATH $ROOTSYS/bin:$PATH setenv LD_LIBRARY_PATH $ROOTSYS/lib:$LD_LIBRARY_PATH
Line: 144 to 144
  You can also pick up tips by looking at the Nevis module files in /usr/nevis/modules.
Changed:
<
<
The scripting language used in module files is Tcl. You don't have to know Tcl to do anything basic with environment modules, but if you want to do anything fancy (e..g, load a package version based on system architecture) you'll find plenty of documentation is just a web search away.
>
>
The scripting language used in module files is Tcl. You don't have to know Tcl to do anything basic with environment modules, but if you want to do anything fancy (e.g., load a package version based on system architecture) you'll find plenty of documentation is just a web search away.
 

How are environment modules set up at Nevis?

Line: 152 to 152
  The Nevis-specific module files are in /usr/nevis/modules. There are some example/utility files that part of the default Linux environment modules package; these are located in /usr/share/Modules/modulefiles and /etc/modulefiles.
Changed:
<
<

Transition: From setup to environment modules

>
>

Transition: From setup to environment modules

 

Why?

Changed:
<
<
Prior to Feb-2015, software packages at Nevis were set up using a custom-written setup. Why make a change?
>
>
Prior to Feb-2015, software packages at Nevis were set up using a custom-written setup command. Why make a change?
 
  • When WilliamSeligman wrote the initial setup script in 1997, it didn't conflict with any existing command. Since then, a setup command has been added to Redhat Linux. Also, the Fermilab UPS tool has its own setup command, which is used in products such as LArSoft. These command conflicts have sometimes been confusing to work around.
Changed:
<
<
  • WilliamSeligman maintained the setup command by maintaining two different scripts, /usr/nevis/adm/setup.sh and /usr/nevis/adm/setup.csh, for sh-style shells and csh-style shells respectively. Keeping these two scripts synchronized was tricky. It was not uncommon for there to be an error in one of them that was not in another.
>
>
  • WilliamSeligman maintained the setup command by revising two different scripts, /usr/nevis/adm/setup.sh and /usr/nevis/adm/setup.csh, for sh-style shells and csh-style shells respectively. Keeping these two scripts synchronized was tricky. It was not uncommon for there to be an error in one of them that was not in another.
 
  • If you look at the two above scripts, you'll see that they consist of lots of "if-then" conditional statements that grew ever more baroque as more package versions were installed at Nevis. The Nevis environment modules in /usr/nevis/modules have their own level of complexity (especially for Geant4), but at least the peculiar properties of each package's version can be isolated and customized separately.
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback