Control the execution environment with job starters
In some cases, using bsub -L does not result in correct environment settings on the execution host.
- 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.
- 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
- HOME
- USER
- SHELL
- LOGNAME
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.
Example
if ($TERM != "xterm") then
set TERM=`tset - -Q -m 'switch:?vt100' ....
else
stty -tabs
endif
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.