[gold-users] 答复: Getting Project metadata into Gold
scottmo at adaptivecomputing.com
Wed Mar 23 10:22:27 MDT 2011
Chris is correct in saying that the standard solution for this is to use the Torque submit filter. This is not a qsub wrapper as it appears you are using (where a wrapper script calls the real qsub), but internal functionality in qsub which calls a filter script to check/rewrite the submit args. This is the perfect place to do what you are asking for without renaming qsub or skirting it in any way. If the project is not specified, you can write it to spit out an informative message and either reject the job submission, put the job on hold, or whatever. Wei is using a similar functionality for LSF when he showed how he did it in esub (the LSF job submission filter -- not wrapper). FYI, it is also possible in gold to set default projects for users in Gold so if they do not specify a project (account in Torque), it will take their default. It is also possible to set up a global default project in Gold. Wei correctly noted that the gquote command is probably your best mechanism within the job submit filter to sanity check the submission and verify sufficient funds. I sometimes also recommend a gbalance at this time so you can warn them if this job submission brings them within say 5x of their limit.
----- Original Message -----
> From: "Jonathan Mills" <jonmills at renci.org>
> To: gold-users at supercluster.org
> Sent: Monday, March 21, 2011 12:31:07 PM
> Subject: Re: [gold-users] 答复: Getting Project metadata into Gold
> Thanks for that. I wasn't aware of the submit filter, and I think it's
> a good option for us to try out. I still would like to see a way to do
> some input validation on the front end, to the qsub command. Right now
> I have a "qsub.pl" perl script which does just that, prior to passing
> the args along to the real qsub command. My other problem now is that
> this is inadequate for users who submit jobs via Globus or Condor. My
> qsub.pl script will print a nice error to stderr if they use an
> account/project. But that stderr doesn't make it back up to
> Globus/Condor, and so the user would get an error and not know why.
> not yet sure how to address it...
> On Sat, 2011-03-19 at 10:41 +1100, Chris Samuel wrote:
> > On Sat, 19 Mar 2011 09:24:41 AM Jonathan Mills wrote:
> > > All I really want is a way to force them to call qsub with
> > > the -A flag and provide a valid project/account name.
> > That's easy, Torque already supports a submit filter which
> > will will get called for every job submitted via qsub.
> > http://www.adaptivecomputing.com/resources/docs/torque/a.jqsubwrapper.php
> > You really don't want to write these in bash, use Perl or Python.
> > cheers!
> > Chris
> gold-users mailing list
> gold-users at supercluster.org
More information about the gold-users