cshrc.lsf and profile.lsf

The user environment shell files cshrc.lsf and profile.lsf set the LSF operating environment on an LSF host.

The cshrc.lsf and profile.lsf files define machine-dependent paths to LSF commands and libraries as environment variables:
  • The cshrc.lsf file sets the C shell (csh or tcsh) user environment for LSF commands and libraries.
  • The profile.lsf file sets and exports the Bourne shell/Korn shell (sh, ksh, or bash) user environment for LSF commands and libraries.
    Tip: LSF Administrators can make sure that cshrc.lsf or profile.lsf are available for users to set the LSF environment variables correctly for the host type that is running LSF.

Location

The cshrc.lsf and profile.lsf files are created by the lsfinstall script during installation. After installation, they are located in the LSF_CONFDIR directory (LSF_TOP/conf/).

Format

The cshrc.lsf and profile.lsf files are conventional UNIX shell scripts:
  • cshrc.lsf runs under /bin/csh
  • profile.lsf runs under /bin/sh

What cshrc.lsf and profile.lsf do

The cshrc.lsf and profile.lsf files determine the binary type (BINARY_TYPE) of the host and set environment variables for the paths to the following machine-dependent LSF directories, according to the LSF version (LSF_VERSION) and the location of the top-level installation directory (LSF_TOP) defined at installation:
  • LSF_BINDIR
  • LSF_SERVERDIR
  • LSF_LIBDIR
The cshrc.lsf and profile.lsf files also set the following user environment variables:
  • LSF_ENVDIR
  • LD_LIBRARY_PATH
  • PATH to include the paths to the following directories:
    • LSF_BINDIR
    • LSF_SERVERDIR
  • MANPATH to include the path to the LSF man pages

If enterprise grid orchestrator is enabled

If enterprise grid orchestrator is enabled in the LSF cluster (the LSF_ENABLE_EGO=Y and LSF_EGO_ENVDIR parameters are defined in the lsf.conf file), the cshrc.lsf and profile.lsf files set the following environment variables.
  • EGO_BINDIR
  • EGO_CONFDIR
  • EGO_ESRVDIR
  • EGO_LIBDIR
  • EGO_LOCAL_CONFDIR
  • EGO_SERVERDIR
  • EGO_TOP

Set the LSF environment with cshrc.lsf and profile.lsf

Before you use LSF, you must use the cshrc.lsf or profile.lsf file to set the LSF execution environment.

Log in to an LSF host and use one of the following shell environment files to set your LSF environment:
  • In the csh or tcsh shell, run the source command:
    % source <LSF_TOP>/conf/cshrc.lsf
  • In the sh, ksh, or bash shell, run the following command:
    $ . <LSF_TOP>/conf/profile.lsf

Making your cluster available to users with cshrc.lsf and profile.lsf

Tip: LSF administrators can make sure all LSF users include one of these files at the end of their own .cshrc or .profile file, or run one of these two files before you use LSF.

For csh or tcsh

Add the cshrc.lsf file to the end of the .cshrc file for all users:
  • Copy the contents of the cshrc.lsf file into the .cshrc file.
  • Add a line with the source command to the end of the .cshrc file.
    For example, if the LSF_TOP directory for your cluster is /usr/share/lsf/conf, add the following line to the .cshrc file:
    source /usr/share/lsf/conf/cshrc.lsf
After you run the cshrc.lsf script, use the setenv command to see the environment variable settings.
setenv
...
PATH=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin
MANPATH=/usr/lsf/llsf_10/10.1.0/man 
LSF_BINDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin 
LSF_SERVERDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/etc 
LSF_LIBDIR=/usr/lsf//10.1.0/linux2.6-glibc2.3-x86/lib 
LD_LIBRARY_PATH=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib 
XLSF_UIDDIR=/usr/lsf/10.1.0/linux2.6-glibc2.3-x86/lib/uid 
LSF_ENVDIR=/usr/lsf/lsf_10/conf
... 
Note: These variable settings are only an example. Your system might set extra variables.

For sh, ksh, or bash

Add profile.lsf to the end of the .profile file for all users:
  • Copy the contents of the profile.lsf file into the .profile file.
  • Add a line that runs the profile.lsf file to the end of the .profile file.
    For example, if the LSF_TOP directory for your cluster is /usr/share/lsf/conf, add the following line to the .profile file:
    . /usr/share/lsf/conf/profile.lsf

After you run the profile.lsf file, use the setenv command to see the environment variable settings.

setenv
... 
LD_LIBRARY_PATH=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib 
LSF_BINDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin 
LSF_ENVDIR=/usr/lsf/lsf_10/conf 
LSF_LIBDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib 
LSF_SERVERDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/etc 
MANPATH=/usr/lsf/lsf_10/10.1.0/man
PATH=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin
XLSF_UIDDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib/uid 
...
Note: These variable settings are only an example. Your system might set more variables.

cshrc.lsf and profile.lsf on dynamically added LSF hosts

Dynamically added LSF hosts that are not management candidates are called server hosts. Each dynamic host has its own LSF binary files, local lsf.conf file, and shell environment scripts (cshrc.lsf and profile.lsf).

LSF environment variables set by cshrc.lsf and profile.lsf

The cshrc.lsf and profile.lsf files set several LSF environment variables.

LSF_BINDIR

The LSF_BINDIR environment variable is set by the cshrc.lsf and profile.lsf files.

Syntax

LSF_BINDIR=dir

Description

Directory where LSF user commands are installed.

Examples

  • Set in csh and tcsh shells by the cshrc.lsf file:
    setenv LSF_BINDIR /usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    LSF_BINDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv LSF_BINDIR $LSF_TOP/$LSF_VERSION/$BINARY_TYPE/bin
    
  • Set and exported in the profile.lsf file for the sh, ksh, or bash shell:
    LSF_BINDIR=$LSF_TOP/$LSF_VERSION/$BINARY_TYPE/bin
    

LSF_ENVDIR

Directory containing the lsf.conf file.

Syntax

LSF_ENVDIR=dir

Description

By default, the lsf.conf file is installed by creating a shared copy in the LSF_CONFDIR directory and adding a symbolic link from the /etc/lsf.conf directory to the shared copy. If the LSF_ENVDIR variable is set, the symbolic link is installed in the LSF_ENVDIR/lsf.conf file.

The lsf.conf file is a global environment configuration file for all LSF services and applications. The LSF default installation places the file in the LSF_CONFDIR directory.

Examples

  • Set in the csh and tcsh shells by the cshrc.lsf file:
    setenv LSF_ENVDIR /usr/lsf/lsf_10/conf
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    LSF_ENVDIR=/usr/lsf/lsf_10/conf
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv LSF_ENVDIR $LSF_TOP/conf
    
  • Set and exported in the profile.lsf file for the sh, ksh, or bash shell:
    LSF_ENVDIR=$LSF_TOP/conf
    

LSF_LIBDIR

Directory where LSF libraries are installed.

Syntax

LSF_LIBDIR=dir

Description

Library files are shared by all hosts of the same type.

Examples

  • Set in the csh and tcsh shells by the cshrc.lsf file:
    setenv LSF_LIBDIR /usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    LSF_LIBDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv LSF_LIBDIR $LSF_TOP/$LSF_VERSION/$BINARY_TYPE/lib
    
  • Set and exported in the profile.lsf files for the sh, ksh, or bash shell:
    LSF_LIBDIR=$LSF_TOP/$LSF_VERSION/$BINARY_TYPE/lib
    

LSF_SERVERDIR

Directory where LSF server binary files and shell scripts are installed.

Syntax

LSF_SERVERDIR=dir

Description

These server binary files include the lim, res, nios, sbatchd, mbatchd, and mbschd daemons. If you use elim, eauth, eexec, esub, or other external executable files, they are also installed in this directory.

Examples

  • Set in the csh and tcsh shells by cshrc.lsf files:
    setenv LSF_SERVERDIR /usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/etc
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    LSF_SERVERDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/etc
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv LSF_SERVERDIR $LSF_TOP/$LSF_VERSION/$BINARY_TYPE/etc
    
  • Set and exported in the profile.lsf file for the sh, ksh, or bash shell:
    LSF_SERVERDIR=$LSF_TOP/$LSF_VERSION/$BINARY_TYPE/etc
    

EGO environment variables set by cshrc.lsf and profile.lsf

The cshrc.lsf and profile.lsf files set the following EGO environment variables: EGO_BINDIR, EGO_CONFDIR, EGO_ESRVDIR, EGO_LIBDIR, EGO_LOCAL_CONFDIR, EGO_SERVERDIR, EGO_TOP.

EGO_BINDIR

Directory where EGO user commands are installed.

Syntax

EGO_BINDIR=dir

Description

The EGO_BINDIR environment variable sets the directory where EGO user commands are installed.

Examples

  • Set in the csh and tcsh shells by the cshrc.lsf file:
    setenv EGO_BINDIR /usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    EGO_BINDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/bin
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv EGO_BINDIR $LSF_BINDIR
    
  • Set and exported in the profile.lsf file for the sh, ksh, or bash shell:
    EGO_BINDIR=$LSF_BINDIR
    

EGO_CONFDIR

Directory containing the ego.conf file.

Syntax

EGO_CONFDIR=dir

Description

EGO_CONFDIR environment variable sets the directory that contains the ego.conf file.

Examples

  • Set in the csh and tcsh shells by the cshrc.lsf file:
    setenv EGO_CONFDIR /usr/lsf/lsf_10/conf/ego/lsf1.2.3/kernel
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    EGO_CONFDIR=/usr/lsf/lsf_10/conf/ego/lsf1.2.3/kernel
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv EGO_CONFDIR /usr/lsf/lsf_10/conf/ego/lsf1.2.3/kernel
    
  • Set and exported in the profile.lsf file for the sh, ksh, or bash shell:
    EGO_CONFDIR=/usr/lsf/lsf_10/conf/ego/lsf1.2.3/kernel
    

EGO_ESRVDIR

Directory where the EGO the service controller configuration files are stored.

Syntax

EGO_ESRVDIR=dir

Description

The EGO_ESRVDIR environment variable sets the directory where the EGO the service controller configuration files are stored.

Examples

  • Set in the csh and tcsh shells by the cshrc.lsf file:
    setenv EGO_ESRVDIR /usr/lsf/lsf_10/conf/ego/lsf/eservice
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    EGO_ESRVDIR=/usr/lsf/lsf_10/conf/ego/lsf/eservice
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv EGO_ESRVDIR /usr/lsf/lsf_10/conf/ego/lsf/eservice
    
  • Set and exported in the profile.lsf file for the sh, ksh, or bash shell:
    EGO_ESRVDIR=/usr/lsf/lsf_10/conf/ego/lsf/eservice
    

EGO_LIBDIR

Directory where EGO libraries are installed.

Syntax

EGO_LIBDIR=dir

Description

The EGO_LIBDIR environment variable sets the directory where EGO libraries are installed. Library files are shared by all hosts of the same type.

Examples

  • Set in the csh and tcsh shells by the cshrc.lsf file:
    setenv EGO_LIBDIR /usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib
    
  • Set and exported in the sh, ksh, or bash shell by the profile.lsf file:
    EGO_LIBDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/lib
    

Values

  • In the cshrc.lsf file for the csh and tcsh shells:
    setenv EGO_LIBDIR $LSF_LIBDIR
    
  • Set and exported in the profile.lsf file for the sh, ksh, or bash shell:
    EGO_LIBDIR=$LSF_LIBDIR
    

EGO_LOCAL_CONFDIR

The local EGO configuration directory that contains the ego.conf file.

Syntax

EGO_LOCAL_CONFDIR=dir

Description

The EGO_LOCAL_CONFDIR environment variable sets the local EGO configuration directory that contains the ego.conf file.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv EGO_LOCAL_CONFDIR /usr/lsf/llsf_10/conf/ego/lsf1.2.3/kernel
    
  • Set and exported in sh, ksh, or bash by profile.lsf:
    EGO_LOCAL_CONFDIR=/usr/lsf/lsf_10/conf/ego/lsf1.2.3/kernel
    

Values

  • In cshrc.lsf for csh and tcsh:
    setenv EGO_LOCAL_CONFDIR /usr/lsf/lsf_10/conf/ego/lsf1.2.3/kernel
    
  • Set and exported in profile.lsf for sh, ksh, or bash:
    EGO_LOCAL_CONFDIR=/usr/lsf/lsf_10/conf/ego/lsf1.2.3/kernel
    

EGO_SERVERDIR

Directory where EGO server binary files and shell scripts are installed.

Syntax

EGO_SERVERDIR=dir

Description

The server binary files in the EGO_SERVERDIR directory include vemkd, pem, egosc, and shell scripts for EGO startup and shutdown.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv EGO_SERVERDIR /usr/lsf/llsf_10/10.1.0/linux2.6-glibc2.3-x86/etc
    
  • Set and exported in sh, ksh, or bash by profile.lsf:
    EGO_SERVERDIR=/usr/lsf/lsf_10/10.1.0/linux2.6-glibc2.3-x86/etc
    

Values

  • In cshrc.lsf for csh and tcsh:
    setenv EGO_SERVERDIR $LSF_SERVERDIR
    
  • Set and exported in profile.lsf for sh, ksh, or bash:
    EGO_SERVERDIR=$LSF_SERVERDIR
    

EGO_TOP

The top-level installation directory for EGO.

Syntax

EGO_TOP=dir

The path to the EGO_TOP directory must be shared and accessible to all hosts in the cluster. Equivalent to the LSF_TOP directory.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv EGO_TOP /usr/lsf/lsf_10
    
  • Set and exported in sh, ksh, or bash by profile.lsf:
    EGO_TOP=/usr/lsf/lsf_10
    

Values

  • In cshrc.lsf for csh and tcsh:
    setenv EGO_TOP /usr/lsf/lsf_10
    
  • Set and exported in profile.lsf for sh, ksh, or bash:
    EGO_TOP=/usr/lsf/lsf_10