25.06.2015 Views

Administering Platform LSF - SAS

Administering Platform LSF - SAS

Administering Platform LSF - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working with eexec<br />

Working with eexec<br />

About eexec<br />

The eexec program runs on the execution host at job start-up and completion<br />

time and when checkpointing is initiated. It is run as the user after the job<br />

environment variables have been set. The environment variable LS_EXEC_T is<br />

set to START, END, and CHKPNT, respectively, to indicate when eexec is<br />

invoked.<br />

If you need to run eexec as a different user, such as root, you must properly<br />

define <strong>LSF</strong>_EEXEC_USER in the file /etc/lsf.sudoers. See the <strong>Platform</strong><br />

<strong>LSF</strong> Reference for information about the lsf.sudoers file.<br />

eexec is expected to finish running because the parent job process waits for<br />

eexec to finish running before proceeding. The environment variable<br />

LS_JOBPID stores the process ID of the process that invoked eexec. If eexec<br />

is intended to monitor the execution of the job, eexec must fork a child and<br />

then have the parent eexec process exit. The eexec child should periodically<br />

test that the job process is still alive using the LS_JOBPID variable.<br />

Using esub and eexec to pass data to execution environments<br />

Limitation<br />

If esub needs to pass some data to eexec, it can write the data to its standard<br />

output for eexec to read from its standard input (stdin). <strong>LSF</strong> effectively acts<br />

as the pipe between esub and eexec (e.g., esub | eexec).<br />

Standard output (stdout) from any esub is automatically sent to eexec.<br />

Since eexec cannot handle more than one standard output stream, only one<br />

esub can use standard output to generate data as standard input to eexec.<br />

For example, the esub for AFS (esub.afs) sends its authentication tokens as<br />

standard output to eexec. If you use AFS, no other esub can use standard<br />

output.<br />

388<br />

<strong>Administering</strong> <strong>Platform</strong> <strong>LSF</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!