High Performance Computing
High End Visualization
About CCR Contact Us Events Facilities Faculty Project Highlights History Job Opportunities News Partners Staff
Bioinformatics Consulting Services Grid Computing Visualization
Accounts Application Software Consulting Getting Started Hardware Resources Frequently Asked Questions Machine Status MyStats Overview Request Help Storage Resources Training/Courses Web Portals
Access Grid Training Outreach
Events Logos Media News Photo Album Videos
Contact Information Directions
  Dashboard > CCR Web > Getting Started > User environment
Log In   View a printable version of the current page.
User environment

Login Shell and Path

The U2 cluster runs the Linux operating system, which is a version of UNIX. The user interface is command line. When a user logs in to the front-end of the cluster, a login shell starts. This is the traditional command line user interface. Users input UNIX commands to the login shell.

The PATH environmental variable is a list of directories that is searched for a command. In order to use a command, either it must be in your path or you must specify the complete path.

Default Login Shell

  • The default login shell for all users is bash (GNU Bourne-Again Shell).
    • View man page for bash: man bash
      Users can request a different login shell; see Getting Help.
  • Show default shell: echo $SHELL

Default PATH

  • Show the default path: echo $PATH
  • Modifying the PATH.
    • Use modules to modify your PATH.
    • Add to the default path (bash): export PATH=newpath:${PATH}

Environmental Variables

  • Show the environment (bash): env

Modules Software Interface

Introduction to Modules

Modules are used to modify paths and set variables for application packages.

  • This is a convenient mechanism for managing your user environment.
  • Modules prevents conflicting entries and mangling in the paths.
    • Loading a module will add application paths to PATH variables and set environmental variables necessary for the application.
    • Unloading a module will remove the the application specified entries from your PATH.
  • Modules can use used on the command line and in PBS scripts (batch).

Commands

  • module avail
    • Display a listing of available modules.
    • Example:
[bono:~]$ module avail
---------------------------- /util/Modules/versions ----------------------------
3.1.6
----------------------- /util/Modules/3.1.6/modulefiles ------------------------
adf/2005.01b                    mpi-hmmer/v2.3.2-0.9
adf/2006.01b(default)           mpiblast/ch_p4/current
adf/2006.01d                    mpich/gcc-3.4.6/ch_mx/1.2.7..4
adf/2007.01                     mpich/gcc-3.4.6/ch_p4/1.2.7p1
amber/8                         mpich/intel-10.0/ch_mx/1.2.7..4
amber/9(default)                mpich/intel-10.0/ch_p4/1.2.7p1
...
  • module avail application-name
    • List the modules available for a particular application.
    • Example:
[bono:~]$ module avail adf
----------------------- /util/Modules/3.1.6/modulefiles ------------------------
adf/2005.01b          adf/2006.01d
adf/2006.01b(default) adf/2007.01
[bono:~]$
  • module load modulefile
    • Load the modulefile into your environment.
    • The default module will be loaded if the full module name is not used.
    • Example:
[bono:~]$ echo $PATH   
/util/Modules/3.1.6/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/kerberos/bin:
/usr/local/maui/sbin:/usr/local/maui/bin:/usr/local/mx/bin:/usr/local/mx/sbin:
/san/user/user1/u2/bin
[bono:~]$ module load adf
'mpich/intel-9/ch_p4/1.2.7p1' load complete.
'adf/2006.01b' load complete.
[bono:~]$ echo $PATH
/util/java/jdk1.5.0_06/bin:/util/intel/cce/9.1.051/bin:/util/intel/fce/9.1.051/bin:/util/intel/idbe/9.1.051/bin:/util/intel/eclipsepackage/3.0.1/eclipse:/util/mpich/1.2.7p1/intel-9/ch_p4/bin:/util/mpich/1.2.7p1/intel-9/ch_p4/sbin:/util/adf/v2006.01b/bin:/util/Modules/3.1.6/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/kerberos/bin:/usr/local/maui/sbin:/usr/local/maui/bin:/usr/local/mx/bin:/usr/local/mx/sbin:/san/user/user1/u2/bin
[bono:~]$
  • module unload modulefile
    • Unload the modulefile from your environment.
    • Example:
[bono:~]$ module unload adf
'mpich/intel-9/ch_p4/1.2.7p1' unload complete.
'adf/2006.01b' unload complete.
[bono:~]$ echo $PATH
/util/Modules/3.1.6/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/kerberos/bin:/usr/local/maui/sbin:/usr/local/maui/bin:/usr/local/mx/bin:/usr/local/mx/sbin:/san/user/user1/u2/bin
[bono:~]$
  • module list
    • Shows the modules currently in your environment.
    • Example:
[bono:~]$ module list
Currently Loaded Modulefiles:
   1) null                          5) intel/9.1
   2) modules                       6) mpich/intel-9/ch_p4/1.2.7p1
   3) use.own                       7) adf/2006.01b
   4) java/j2sdk/1.5.0_06
[bono:~]$
  • module show modulefile
    • Shows the paths and variables set by a module.
    • Example:
[bono:~]$ module show adf
-------------------------------------------------------------------
/util/Modules/3.1.6/modulefiles/adf/2006.01b:
module-whatis    ADF Quantum Chemistry Package
setenv           ADFHOME /util/adf/v2006.01b
setenv           ADFBIN /util/adf/v2006.01b/bin
setenv           ADFRESOURCES /util/adf/v2006.01b/atomicdata
setenv           SCMLICENSE /util/adf/v2005.01b/license
setenv           MPIDIR /util/mpich/1.2.7p1/intel-9/ch_p4
prepend-path     PATH /util/adf/v2006.01b/bin
setenv           NSCM 1
module           load mpich/intel-9/ch_p4/1.2.7p1
-------------------------------------------------------------------
[bono:~]$
  • module help modulefile
    • Display extended help listing of modulefile, often contains detailed links to further informational resources.

Using modules in batch

  • If you change shells in your batch script you may need to explicitly load the modules environment (if your script does not use modules commands, there is, of course, no need to do this) by adding a the following line (e.g. for bash) to your bash script:
. ${MODULESHOME}/init/bash

Creating your own modulefiles

  • You can create your own modules files, for example, in organizing your own software installs and development trees.
  • The module use.own, when loaded, allows modules to look at your $HOME/privatemodules directory for additional modules that you can then access through the modules interface.
  • On CCR's systems, you can refer to the $MODULESHOME/modulefiles/template for a reference modulefile.
    • Also see the modulefile man page for a detailed description of the syntax used in these files.

Other sources of information on modules

Data Files from Windows Workstations

Remove Windows control characters from text files.

  • dos2unix -n oldfile.txt newfile.txt

Spaces embedded in filenames and directory names

  • Use "\" followed by a space to specify filenames with spaces.
  • Convert the embedded spaces to underscore with the convertspaces.zsh script.

Center for Computational Research - University at Buffalo - State University of New York