[torqueusers] set automatically a mem max ressources when the user submits a job with a nodes/cpu param

Gabe Turner gabe at msi.umn.edu
Fri Sep 24 08:52:41 MDT 2010


On Fri, Sep 24, 2010 at 10:10:38AM +0200, giggzounet wrote:
> > On Thu, 2010-09-23 at 11:59 +0200, giggzounet wrote:
> 
> Could you, please, send me a more complicated example of filter script
> for Torque ?
> 
> Because I don't understand the input of the filter ? is it the name of
> the job file or direct the data ???

The submission script is just passed to the filter on stdin, hence the
'while read i' in the example bash script.  'read()' just reads a line on
standard input.  Then within the while in the example, the line is just
echoed to stdout.  See the sh man page, or read(1p) if your distribution of
choice has it.

So, the example script:

echo "#PBS -l mem=16MB"

while read i
  do
    echo $i
  done


Effectively adds the line '#PBS -l mem=16MB' to the top of the submission
script.  It should be noted that one _must_ write to stdout anything that
they want to appear in the script that is submitted.  If you exit() from
the script before writing everything the script needs to stdout, you will
not get everything that was in the submitted script.

HTH,

Gabe
-- 
Gabe Turner                                             gabe at msi.umn.edu
HPC Systems Administrator,
University of Minnesota
Supercomputing Institute                          http://www.msi.umn.edu


More information about the torqueusers mailing list