LSF Version 7.3 - Administering Platform LSF
Existing esub
582 Administering Platform LSF
The name of the esub program must be a valid file name. It can contain only
alphanumeric characters, underscore (
_) and hyphen (-).
CAUTION: The file name esub.user is reserved for backward compatibility. Do not use the
name esub.user for your application-specific esub.
Existing esub
Your existing esub does not need to follow this convention and does not need to be
renamed. However, since mesub invokes any esub that follows this convention, you
should move any backup copies of your esubs out of LSF_SERVERDIR or choose a
name that does not follow the convention (for example, use esub_bak instead of
esub.bak).
Working with eexec
About eexec
The eexec program runs on the execution host at job start-up and completion time
and when checkpointing is initiated. It is run as the user after the job environment
variables have been set. The environment variable LS_EXEC_T is set to START,
END, and CHKPNT, respectively, to indicate when
eexec is invoked.
If you need to run
eexec as a different user, such as root, you must properly define
LSF_EEXEC_USER in the file
/etc/lsf.sudoers. See the Platform LSF
Configuration Reference for information about the
lsf.sudoers file.
eexec is expected to finish running because the parent job process waits for eexec
to finish running before proceeding. The environment variable LS_JOBPID stores
the process ID of the process that invoked
eexec. If eexec is intended to monitor
the execution of the job,
eexec must fork a child and then have the parent eexec
process exit. The
eexec child should periodically test that the job process is still
alive using the LS_JOBPID variable.
Using esub and eexec to pass data to execution environments
If esub needs to pass some data to eexec, it can write the data to its standard output
for
eexec to read from its standard input (stdin). LSF effectively acts as the pipe
between
esub and eexec (e.g., esub | eexec).
Standard output (
stdout) from any esub is automatically sent to eexec.
Limitation
Since eexec cannot handle more than one standard output stream, only one esub
can use standard output to generate data as standard input to
eexec.
For example, the
esub for AFS (esub.afs) sends its authentication tokens as
standard output to
eexec. If you use AFS, no other esub can use standard output.