[gridengine users] Listener on job parameters change ?
reuti at staff.uni-marburg.de
Wed Jul 13 11:06:38 UTC 2016
> Am 13.07.2016 um 11:57 schrieb Julien Nicoulaud <julien.nicoulaud at gmail.com>:
> I would like my jobs to get notified of parameters changes (using qalter), let's say for example priority or complex attributes.
> Is there such mechanism in SGE ?
> The only one I can think of is the JGDI API, which seems to have JobModEvent/JobPriorityModEvent, but the documentation is rather sparse :)
> Also, I don't know what is the overhead/scalability of this API. If I make each job connect its own JGDI client, then there will be hundreds of JGDI clients...
So the job itself should get this information? Many of the settings which you can change with `qalter` may be recognized, but will be used only in case the job gets rescheduled. For example you can't increase the h_rt of the job while it's running or grants it a higher h_vmem.
If it's just to give some information to the job that it should behave different, the job context would be the way to go. This will be set instantly and can also be read by the job by executing `qstat` at certain times and scan the output for the line starting with "context:".
> Another approach would be to just poll the job parameters every X seconds, but I am not sure what is the best way to do it.
> It looks like parsing the output of "qstat -xml -j <JOB>" is the only way to get the priority.
The priority is the nice value which is set in the queue definition. This is not related to a particular job setting. How would you change the priority for a job?
> Thanks in advance,
> users mailing list
> users at gridengine.org
More information about the users