[gridengine users] Listener on job parameters change ?
julien.nicoulaud at gmail.com
Mon Sep 5 14:03:19 UTC 2016
2016-07-13 13:06 GMT+02:00 Reuti <reuti at staff.uni-marburg.de>:
> > Am 13.07.2016 um 11:57 schrieb Julien Nicoulaud <
> julien.nicoulaud at gmail.com>:
> > Hi,
> > 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:".
Yes, I could do what I need, thank you:
- For priority: EventClient and listen to JobPriorityModEvent
- "Static" attributes: JGDI
- "Static" attributes set within job itself: polling job context with JGDI
> > 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?
qalter -p 1024 <job id>
This is the one I am talking about (we use it as quick and dirty way to get
on top of the wait queue, we don't really care about the nice value)
By the way, I can't find the right way to implement the equivalent to
"qalter -p" using JGDI...
If I do this:
final Job job = jgdi.getJob(jobId);
job.setPriority(1024 + newPriority);
com.sun.grid.jgdi.JGDIException: jnicoulaud at cluster sets job functional
ticket share of job 6651842.1 to 0
jnicoulaud at cluster sets override tickets of job 6651842 to 0
jnicoulaud at cluster sets scheduling priority of job 6651842 to 288
jnicoulaud at cluster sets job share of job 6651842 to 0
jnicoulaud at cluster sets job advance reservation of job 6651842 to 0
job rejected: the user "jnicoulaud" is no deadline initiation user
So its looks like it is attempting to update more job fields than intended,
but I cannot find a more fine-grained API than updateJob()...
> -- Reuti
> > Thanks in advance,
> > Julien
> > _______________________________________________
> > users mailing list
> > users at gridengine.org
> > https://gridengine.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users