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.

Chapter 28<br />

Pre-Execution and Post-Execution Commands<br />

Job-level commands<br />

Queue-level commands<br />

Post-execution job states<br />

The bsub -E option specifies an arbitrary command to run before starting the<br />

batch job. When <strong>LSF</strong> finds a suitable host on which to run a job, the preexecution<br />

command is executed on that host. If the pre-execution command<br />

runs successfully, the batch job is started.<br />

Job-level post-execution commands are not supported.<br />

In some situations (for example, license checking), it is better to specify a<br />

queue-level pre-execution command instead of requiring every job be<br />

submitted with the -E option of bsub.<br />

Queue-level commands run on the execution host before or after a job from<br />

the queue is run.<br />

The <strong>LSF</strong> administrator uses the PRE_EXEC and POST_EXEC parameters in<br />

lsb.queues to set up queue-level pre- and post-execution commands.<br />

Some jobs may not be considered complete until some post-job processing is<br />

performed. For example, a job may need to exit from a post-execution job<br />

script, clean up job files, or transfer job output after the job completes.<br />

The DONE or EXIT job states do not indicate whether post-processing is<br />

complete, so jobs that depend on processing may start prematurely. Use the<br />

post_done and post_err keywords on the bsub -w command to specify job<br />

dependency conditions for job post-processing. The corresponding job states<br />

POST_DONE and POST_ERR indicate the state of the post-processing.<br />

The bhist command displays the POST_DONE and POST_ERR states. The<br />

resource usage of post-processing is not included in the job resource usage.<br />

After the job completes, you cannot perform any job control on the postprocessing.<br />

Post-processing exit codes are not reported to <strong>LSF</strong>. The postprocessing<br />

of a repetitive job cannot be longer than the repetition period.<br />

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

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

Saved successfully!

Ooh no, something went wrong!