Objective

There are several mom hook events already in place in PBS that respond to when job first enters pbs_mom for execution (EXECJOB_BEGIN), when job does its initial setup (EXECJOB_PROLOGUE), when job is requested to be terminated early (EXECJOB_PRETERM), when job starts performing its cleanup (EXECJOB_EPILOGUE), and when job finally leaves pbs_mom (EXECJOB_END). One event that is useful to have and is proposed in this design is a hook event that responds to when a job prematurely exits during startup. Such a hook event would be useful especially when a site has coded an execjob_begin (or execjob_prologue) hook that does some sort of system setup like pre-creating files for a job, and those files are needed to be cleaned up after job ends using an execjob_epilogue or execjob_end hook. But if the job suddenly ends prematurely, the epilogue hook or end hook may not always execute. Thus, there's a need for a new hook event, which will be called EXECJOB_ABORT, to handle the situation.

Forum: http://community.pbspro.org/t/a-new-hook-event-execjob-abort/1460

Why add a new hook execjob_abort event instead of calling existing execjob_end hook for all abort cases?

A new execjob_abort hook has been introduced instead of reusing the execjob_end hook to allow backwards compatibility. Some sites may already have execjob_end hooks in place, and would be surprised to see that their hook be called additionally when a sister mom fails to join the job, or when primary mom fails to start a job.

The end hook's purpose may not always be to do cleanup, but just  print end of job statistics that it would not expect to be displayed when a sister mom even fails to become part of the job.

Interface 1: new mom hook event: execjob_abort

                     import pbs

                     e=pbs.event()

                     if e.job.not_in_msmom():

                         <do cleanup code>

                   






OSS Site Map

Project Documentation Main Page

Developer Guide Pages


Ignore this.  We may use it later for page characterization.