cshrc.lsf and profile.lsf

About cshrc.lsf and profile.lsf

The user environment shell files cshrc.lsf and profile.lsf set the LSF operating environment on an LSF host. They define machine-dependent paths to LSF commands and libraries as environment variables:
  • cshrc.lsf sets the C shell (csh or tcsh) user environment for LSF commands and libraries

  • profile.lsf sets and exports the Bourne shell/Korn shell (sh, ksh, or bash) user environment for LSF commands and libraries
    Tip: LSF Administrators should make sure that cshrc.lsf or profile.lsf are available for users to set the LSF environment variables correctly for the host type running LSF.

Location

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

Format

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

  • profile.lsf runs under /bin/sh

What cshrc.lsf and profile.lsf do

cshrc.lsf and profile.lsf 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

  • XLSF_UIDDIR

cshrc.lsf and profile.lsf also set the following user environment variables:
  • LSF_ENVDIR

  • LD_LIBRARY_PATH

  • PATH to include the paths to:
    • LSF_BINDIR

    • LSF_SERVERDIR

  • MANPATH to include the path to the LSF man pages

If EGO is enabled

If EGO is enabled in the LSF cluster (LSF_ENABLE_EGO=Y and LSF_EGO_ENVDIR are defined in lsf.conf), cshrc.lsf and profile.lsf set the following environment variables.
  • EGO_BINDIR

  • EGO_CONFDIR

  • EGO_ESRVDIR

  • EGO_LIBDIR

  • EGO_LOCAL_CONFDIR

  • EGO_SERVERDIR

  • EGO_TOP

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

Before using LSF, you must set the LSF execution environment.

After logging on to an LSF host, use one of the following shell environment files to set your LSF environment:

  • For example, in csh or tcsh:
    source /usr/lsf/lsf_9/conf/cshrc.lsf
  • For example, in sh, ksh, or bash:
    . /usr/lsf/lsf_9/conf/profile.lsf

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

To set the LSF user environment, run one of the following two shell files:

  • LSF_CONFDIR/cshrc.lsf (for csh, tcsh)

  • LSF_CONFDIR/profile.lsf (for sh, ksh, or bash)
    Tip:

    LSF administrators should 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 using LSF.

For csh or tcsh

Add cshrc.lsf to the end of the .cshrc file for all users:

  • Copy the cshrc.lsf file into .cshrc, or

  • Add a line similar to the following to the end of .cshrc:
    source /usr/lsf/lsf_9/conf/cshrc.lsf
After running cshrc.lsf, use setenv to see the environment variable settings. For example:
setenv 
PATH=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin
... 
MANPATH=/usr/lsf/lsf_9/9.1.2/man 
... 
LSF_BINDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin 
LSF_SERVERDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/etc 
LSF_LIBDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib 
LD_LIBRARY_PATH=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib 
XLSF_UIDDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib/uid 
LSF_ENVDIR=/usr/lsf/lsf_9/conf
Note: These variable settings are an example only. Your system may set additional variables.

For sh, ksh, or bash

Add profile.lsf to the end of the .profile file for all users:

  • Copy the profile.lsf file into .profile, or

  • Add a line similar to following to the end of .profile:
    . /usr/lsf/lsf_9/conf/profile.lsf
    After running profile.lsf, use the setenv command to see the environment variable settings. For example:
    setenv
    ... 
    LD_LIBRARY_PATH=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib 
    LSF_BINDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin 
    LSF_ENVDIR=/usr/lsf/lsf_9/conf 
    LSF_LIBDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib 
    LSF_SERVERDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/etc 
    MANPATH=/usr/lsf/lsf_9/9.1.2/man
    PATH=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin
    ...
    XLSF_UIDDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib/uid 
    ...
    Note: These variable settings are an example only. Your system may set additional variables.

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

Dynamically added LSF hosts that will not be master candidates are slave hosts. Each dynamic slave host has its own LSF binaries and local lsf.conf and shell environment scripts (cshrc.lsf and profile.lsf).

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

LSF_BINDIR

Syntax

LSF_BINDIR=dir

Description

Directory where LSF user commands are installed.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv LSF_BINDIR /usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin
  • Set and exported in sh, ksh, or bash by profile.lsf:
    LSF_BINDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin

Values

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

LSF_ENVDIR

Syntax

LSF_ENVDIR=dir

Description

Directory containing the lsf.conf file.

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

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

Examples

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

Values

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

LSF_LIBDIR

Syntax

LSF_LIBDIR=dir

Description

Directory where LSF libraries are installed. Library files are shared by all hosts of the same type.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv LSF_LIBDIR /usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib
  • Set and exported in sh, ksh, or bash by profile.lsf:
    LSF_LIBDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib

Values

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

LSF_SERVERDIR

Syntax

LSF_SERVERDIR=dir

Description

Directory where LSF server binaries and shell scripts are installed.

These include lim, res, nios, sbatchd, mbatchd, and mbschd. If you use elim, eauth, eexec, esub, etc, they are also installed in this directory.

Examples

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

Values

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

XLSF_UIDDIR

Syntax

XLSF_UIDDIR=dir

Description

(UNIX and Linux only) Directory where Motif User Interface Definition files are stored.

These files are platform-specific.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv XLSF_UIDDIR /usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib/uid
  • Set and exported in sh, ksh, or bash by profile.lsf:
    XLSF_UIDDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib/uid

Values

  • In cshrc.lsf for csh and tcsh:
    setenv XLSF_UIDDIR $LSF_TOP/$LSF_VERSION/$BINARY_TYPE/lib/uid
  • Set and exported in profile.lsf for sh, ksh, or bash:
    XLSF_UIDDIR=$LSF_TOP/$LSF_VERSION/$BINARY_TYPE/lib/uid

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

EGO_BINDIR

Syntax

EGO_BINDIR=dir

Description

Directory where EGO user commands are installed.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv EGO_BINDIR /usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin
  • Set and exported in sh, ksh, or bash by profile.lsf:
    EGO_BINDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/bin

Values

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

EGO_CONFDIR

Syntax

EGO_CONFDIR=dir

Description

Directory containing the ego.conf file.

Examples

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

Values

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

EGO_ESRVDIR

Syntax

EGO_ESRVDIR=dir

Description

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

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv EGO_ESRVDIR /usr/lsf/lsf_9/conf/ego/lsf702/eservice
  • Set and exported in sh, ksh, or bash by profile.lsf:
    EGO_ESRVDIR=/usr/lsf/lsf_9/conf/ego/lsf702/eservice

Values

  • In cshrc.lsf for csh and tcsh:
    setenv EGO_ESRVDIR /usr/lsf/lsf_9/conf/ego/lsf702/eservice
  • Set and exported in profile.lsf for sh, ksh, or bash:
    EGO_ESRVDIR=/usr/lsf/lsf_9/conf/ego/lsf702/eservice

EGO_LIBDIR

Syntax

EGO_LIBDIR=dir

Description

Directory where EGO libraries are installed. Library files are shared by all hosts of the same type.

Examples

  • Set in csh and tcsh by cshrc.lsf:
    setenv EGO_LIBDIR /usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib
  • Set and exported in sh, ksh, or bash by profile.lsf:
    EGO_LIBDIR=/usr/lsf/lsf_9/9.1.2/linux2.6-glibc2.3-x86/lib

Values

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

EGO_LOCAL_CONFDIR

Syntax

EGO_LOCAL_CONFDIR=dir

Description

The local EGO configuration directory containing the ego.conf file.

Examples

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

Values

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

EGO_SERVERDIR

Syntax

EGO_SERVERDIR=dir

Description

Directory where EGO server binaries and shell scripts are installed. These 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/lsf_9/9.1.2/linux2.6-glibc2.3-x86/etc
  • Set and exported in sh, ksh, or bash by profile.lsf:
    EGO_SERVERDIR=/usr/lsf/lsf_9/9.1.2/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

Syntax

EGO_TOP=dir

Description

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

Examples

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

Values

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