Platform LSF Administration Guide Version 6.2
About Job Starters
Administering Platform LSF
486
About Job Starters
Some jobs have to run in a particular environment, or require some type of setup to be
performed before they run. In a shell environment, job setup is often written into a
wrapper shell script file that itself contains a call to start the desired job.
A job starter is a specified wrapper script or executable program that typically performs
environment setup for the job, then calls the job itself, which inherits the execution
environment created by the job starter. LSF controls the job starter process, rather than
the job. One typical use of a job starter is to customize LSF for use with specific
application environments, such as Alias Renderer or IBM Rational ClearCase.
Two ways to run job starters
You run job starters two ways in LSF. You can accomplish similar things with either job
starter, but their functional details are slightly different.
Command-level
job starters
Are user-defined. They run interactive jobs submitted using lsrun, lsgrun, or ch.
Command-level job starters have no effect on batch jobs, including interactive batch
jobs run with
bsub -I.
Use the LSF_JOB_STARTER environment variable to specify a job starter for
interactive jobs. See “Controlling Execution Environment Using Job Starters” on
page 492 for detailed information.
Queue-level job
starters
Defined by the LSF administrator, and run batch jobs submitted to a queue defined with
the JOB_STARTER parameter set. Use
bsub to submit jobs to queues with job-level
job starters.
A queue-level job starter is configured in the queue definition in
lsb.queues. See
“Queue-Level Job Starters” on page 490 for detailed information.
Pre-execution commands are not job starters
A job starter differs from a pre-execution command. A pre-execution command must
run successfully and exit before the LSF job starts. It can signal LSF to dispatch the job,
but because the pre-execution command is an unrelated process, it does not control the
job or affect the execution environment of the job. A job starter, however, is the process
that LSF controls. It is responsible for invoking LSF and controls the execution
environment of the job.
See Chapter 31, “Pre-Execution and Post-Execution Commands” for more
information.
Examples
The following are some examples of job starters:
◆
In UNIX, a job starter defined as /bin/ksh -c causes jobs to be run under a
Korn shell environment.
◆
In Windows, a job starter defined as C:\cmd.exe /C causes jobs to be run under
a DOS shell environment.
◆
Setting the JOB_STARTER parameter in lsb.queues to $USER_STARTER
enables users to define their own job starters by defining the environment variable
USER_STARTER.