LSF Version 7.3 - Platform LSF Configuration Reference

Configuration file Parameter and syntax Behavior
lsb.applications
PRE_EXEC=command
Enables pre-execution processing at the application level.
The pre-execution command runs on the execution host
before the job starts.
If the PRE_EXEC command exits with a non-zero exit code,
LSF requeues the job to the front of the queue.
The PRE_EXEC command uses the same environment
variable values as the job.
POST_EXEC=
command
Enables post-execution processing at the application level.
The POST_EXEC command uses the same environment
variable values as the job.
The post-execution command for the application profile
remains associated with the job. The original post-execution
command runs even if the job is moved to a different
application profile or is requeued, or if the post-execution
command for the original application profile is changed after
job submission.
Before the post-execution command runs,
LSB_JOBEXIT_STAT is set to the exit status of the job. The
success or failure of the post-execution command has no
effect on LSB_JOBEXIT_STAT.
The post-execution command runs after the job finishes,
even if the job fails.
Specify the environment variable $USER_POSTEXEC to
allow UNIX users to define their own post-execution
commands.
Pre- and post-execution processing behavior
Pre- and post-execution processing applies to both UNIX and Windows hosts.
Host type
Environment
UNIX
The pre- and post-execution commands run in the /tmp directory under /bin/sh -c,
which allows the use of shell features in the commands. The following example shows
valid configuration lines: PRE_EXEC= /usr/share/lsf/misc/testq_pre >> /
tmp/pre.out POST_EXEC= /usr/share/lsf/misc/testq_post | grep -v
"Testing..."
LSF sets the PATH environment variable to PATH='/bin /usr/bin /sbin /usr/
sbin'
The stdin, stdout, and stderr are set to /dev/null
Windows
The pre- and post-execution commands run under cmd.exe /c
The standard input, standard output, and standard error are set to NULL
The PATH is determined by the setup of the LSF Service
Note:
Feature: Pre-execution and post-execution processing
Platform LSF Configuration Reference 39