LSF Version 7.3 - Administering Platform LSF
Administering Platform LSF 569
Job Starters
LSF_JOB_STARTER environment variable
Use the LSF_JOB_STARTER environment variable to specify a command or script
that is the job starter for the interactive job. When the environment variable
LSF_JOB_STARTER is defined, RES invokes the job starter rather than running the
job itself, and passes the job to the job starter as a command-line argument.
Using command-level job starters
UNIX The job starter is invoked from within a Bourne shell, making the command-line
equivalent:
/bin/sh -c "$LSF_JOB_STARTER command [argument ...]"
where command and argument are the command-line arguments you specify in
lsrun, lsgrun, or ch.
Windows RES runs the job starter, passing it your commands as arguments:
LSF_JOB_STARTER command [argument ...]
Examples
UNIX If you define the LSF_JOB_STARTER environment variable using the following
C-shell command:
% setenv LSF_JOB_STARTER "/bin/sh -c"
Then you run a simple C-shell job:
%
lsrun "’a.out; hostname’"
The command that actually runs is:
/bin/sh -c "/bin/sh -c ’a.out hostname’"
The job starter can be a shell script. In the following example, the
LSF_JOB_STARTER environment variable is set to the Bourne shell script named
job_starter:
$
LSF_JOB_STARTER=/usr/local/job_starter
The job_starter script contains the following:
#!/bin/sh
set term = xterm
eval "$*"
Windows If you define the LSF_JOB_STARTER environment variable as follows:
set LSF_JOB_STARTER=C:\cmd.exe /C
Then you run a simple DOS shell job:
C:\>
lsrun dir /p
The command that actually runs is:
C:\cmd.exe /C dir /p