JSV example for rewriting parallel environment requests
Job Submission Verifiers are expected to be a huge win for Grid Engine users and administrators but the feature is new enough that there is not a lot of best practices and working code "in the wild" that the community can copy and learn from ...
In this mailing list thread, however, we get an actual JSV code snippet showing how one might intercept user "-pe " requests and seamlessly alter the parallel environment request to one that makes use of the wildcard '*' selector:
In the latest SGE, you can use the JSV(1) mechanism to do arbitrary re-writes of the qsub options. I don't remember seeing real examples of this posted, so one that re-writes something like `-pe openmpi' to `-pe openmpi-*' to hide the fact that there are multiple PEs for nodes with different core counts, and you normally don't want the parallel job scheduled across such node groups.
#!/bin/sh
jsv_on_start() {
return
}
jsv_on_verify() {
pe=$(jsv_get_param pe_name)
case "$pe" in
openmpi | fluent)
jsv_set_param pe_name "$pe-*"
jsv_correct "Job was modified"
;;
esac
jsv_accept "Job OK"
return
}
. ${SGE_ROOT}/util/resources/jsv/jsv_include.sh
jsv_main
Signs of JSV use in the wild
Just wanted to point out the following mailing list thread - it's notable because it's one of the earlier indications I've seen of people using the new JSV features in the 6.2u3 beta Grid Engine release.
In this thread, Andreas is writing a server-side JSV script that checks to see that users have requested at least 256M for h_vmem resource requests.

XML Feeds