Should be one or more of: queuejob,modifyjob,resvsub,movejob,runjob,provision,periodic,execjob_begin,execjob_prologue,execjob_epilogue,execjob_preterm,execjob_end,exechost_periodic,execjob_launch,exechost_startup,execjob_attach or "" for no event

Example:

# qmgr -c "s h h1 event=pop"

qmgr obj=h1 svr=default: invalid argument (pop) to event. Should be one or more of: queuejob,modifyjob,resvsub,movejob,runjob,provision,periodic,execjob_begin,execjob_prologue,execjob_epilogue,execjob_preterm,execjob_end,exechost_periodic,execjob_launch,exechost_startup,execjob_attach or "" for no event

qmgr: hook error returned from server


"Server periodic hook encountered errors"

"A periodic hook disappeared"



      • Interface 11: Create and add a new Job
        • Visibility: Public

        • Change Control: Experimental

        • Details:

          • To create a blank job object, hook must use "job" interface exposed by pbs module.
          • If hook is trying to submit a job, server interface "submit" should be called with job object being passed as an input to the interface.
            usage :
            j1 = pbs.job()
            j1.Resource_list["ncpus"] = int(2)
            j1.executable = "<jsdl-hpcpa:Executable>top</jsdl-hpcpa:Executable>"
            pbs.server().submit(j1)
          • Submission will only be attempted when server periodic hook calls accept. In case server fails to submit a job, appropriate log message will be logged in server logs.

      • Interface 12: Changes to pbs.depend()
        • Visibility: Public
        • Change Control: Experimental
        • Details:
          • Hook writers will be able to establish dependency between different job objects without having to know their job ids.
          • pbs.depend() interface, accepts a dictionary of dependency where a key can be a dependency type (which is one of - 

            "after", "afterok", "afterany", "afternotok", "before", "beforeok", "beforeany", and "beforenotok”) and value can be a list of job objects.

          • example:

            j1 = pbs.job()

            j1.Resource_list["ncpus"]= int(2)

            j1.executable = "<jsdl-hpcpa:Executable>top</jsdl-hpcpa:Executable>"

            pbs.server.submit(j1)

            j2 = pbs.server().job("12.host1")

            j3 = pbs.job()

            j3.depend = pbs.depend( { 'afterok' : [j1,j2] } )

            pbs.server.submit(j3)


      • Interface 13: How to associate job to a reservation

        • Visibility: Public

        • Change Control: Experimental

        • Details:

          • Hook writers will be able to associate a job to a reservation without having to know the reservation ID.

          • There is a new method exposed in job object called "add_to_resv()" which can be used to add a job to a reservation.
            • This method expects a reservation object where job needs to run to be passed to it as an input.
          • example:

            j1 = pbs.job()

            r1 = pbs.resv()

            r1.reserve_start = int(time.time())+30

            r1.reserve_duration = 600

            pbs.server().submit(r1)

            j1.queue = r1.queue

            pbs.server().submit(j1)