Control the execution environment with job starters

In some cases, using bsub -L does not result in correct environment settings on the execution host. LSF provides the following two job starters:
  • preservestarter - preserves the default environment of the execution host. It does not include any submission host settings.

  • augmentstarter - augments the default user environment of the execution host by adding settings from the submission host that are not already defined on the execution host

bsub -L cannot be used for a Windows execution host.

Where the job starter executables are located

By default, the job starter executables are installed in LSF_BINDIR. If you prefer to store them elsewhere, make sure they are in a directory that is included in the default PATH on the execution host.

For example:
  • On Windows, put the job starter under %WINDIR%.

  • On UNIX, put the job starter under $HOME/bin.

Source code for the job starters

The source code for the job starters is installed in LSF_MISC/examples.

Add to the initial login environment

By default, the preservestarter job starter preserves the environment that RES establishes on the execution host, and establishes an initial login environment for the user with the following variables from the user’s login environment on the execution host:
  • HOME

  • USER



Any additional environment variables that exist in the user’s login environment on the submission host must be added to the job starter source code.


A user’s .login script on the submission host contains the following setting:
if ($TERM != "xterm") then
     set TERM=`tset - -Q -m 'switch:?vt100' .... 
    stty -tabs 

The TERM environment variable must also be included in the environment on the execution host for login to succeed. If it is missing in the job starter, the login fails, the job starter may fail as well. If the job starter can continue with only the initial environment settings, the job may execute correctly, but this is not likely.