A job starter is a specified shell script or executable program that sets up the environment for a job and then runs the job. The job starter and the job share the same environment. This chapter discusses two ways of running job starters in LSF and how to set up and use them.
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.
You run job starters two ways in LSF. You can accomplish similar things with either job starter, but their functional details are slightly different.
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.
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.
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.
In UNIX, a job starter defined as /bin/ksh -c causes jobs to be run under a Korn shell environment.
For job starters that execute on a Windows Server 2003, x64 Edition platform, users must have “Read” and “Execute” privileges for cmd.exe.
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.
USER_STARTER can only be used in UNIX clusters. Mixed or Windows-only clusters are not supported.
Setting a job starter to make clean causes the command make clean to be run before the user job.