[torqueusers] Job array throttling

Glen Beane glen.beane at gmail.com
Thu Jul 10 11:12:00 MDT 2008

On Thu, Jul 10, 2008 at 12:47 PM, Gabe Turner <gabe at msi.umn.edu> wrote:

> On Thu, Jul 10, 2008 at 10:19:27AM -0400, Glen Beane wrote:
> [snip]
> >    I think a submit filter *should* also have access to anything passed
> on
> >    the command line (but that doesn't mean that is what the current
> >    implementation does, I would consider that a bug if it does not).
> Can anyone confirm that a submit filter has access to qsub options passed
> on the command line?  As far as I know, it just reads the submission script
> in line-by-line.  The information in the Torque admin manual and on the
> wiki is sparse.

in qsub.c, in the get_script() function, the code relaited to the submit
filter does this, not ArgV, ArgC are parameters to get_script(), and get
script is called with argc, argv for those parameters:


    for (index = 1;index < ArgC;index++)
      if (ArgV[index] != NULL)
        strcat(cfilter," ");

      }    /* END for (index) */

    strcat(cfilter," >");
    filter_pipe = popen(cfilter,"w");

    while ((in = fgets(s,MAX_LINE_LEN,file)) != NULL)
      if (fputs(in,filter_pipe) < 0)
        fprintf(stderr,"qsub: error writing to filter stdin\n");



    rc = pclose(filter_pipe);


so the way the submit filter is actually called should be like this:

path_to_submit_filter qub_args... > /tmp/qsub.XXXXX

and then each line from the script gets written to the pipe created by
calling popen on the  command shown above

that being said, there may be some bugs in qsub with respect to the submit
filter.  i'm not sure if everything works 100% correctly with interactive
jobs, I know some people had issues with that in the past and I'm not sure
if they have been fixed yet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20080710/8ef39db1/attachment.html

More information about the torqueusers mailing list