[torqueusers] Python submit scripts?

Nate Woody Nate.A.Woody at runbox.com
Wed Jul 9 10:03:01 MDT 2008


It's probably worth pointing out this (if you're not already familiar):

https://subtrac.sara.nl/oss/pbs_python

Python interface to the PBS API, quite easy to use, you should be safe with that old of a version of torque, but I have no way of testing that.  The Sara guys might be able to help you with that.

Best,
Nate


----- Start Original Message -----
Sent: Wed, 9 Jul 2008 11:31:01 -0400
From: Brock Palen <brockp at umich.edu>
To: Prentice Bisbal <prentice at ias.edu>
Subject: Re: [torqueusers] Python submit scripts?

> Don't know way to old.  We do do this all the time for bulk jobs:
> 
> #!/usr/bin/python
> from popen2 import popen2
> 
> #put all this in a loop or make into a function
> output, input = popen2('qsub')
> #write inputs
> input.write('#PBS -N jobname\n')
> input.write('#PBS -M emailpy at umich.edu\n')
> input.write('#PBS -m abe\n')
> input.write('#PBS -l nodes=2:ppn=2,walltime=24:00\n')
> input.write('#just a comment\n')
> input.write('echo "I ran on"')
> input.write('cat $PBS_NODEFILE')
> input.wirte('mpirun -np 4 lmp_fink')
> 
> #finish script
> input.close()
> 
> #end example
> #this will be the job id if you want it,
> print output.read()
> 
> Brock Palen
> www.umich.edu/~brockp
> Center for Advanced Computing
> brockp at umich.edu
> (734)936-1985
> 
> 
> 
> On Jul 9, 2008, at 10:44 AM, Prentice Bisbal wrote:
> > Correction: E-mail below should read as follows:
> >
> > Is is possible to write job submission scripts in python using
> > torque_1.1.0p2? My cluster is old and about to be replaced, so there's
> > no point in upgrading now, but I have a user who wrote a submit script
> > in Python to work around a bug we found in our antiquated version  
> > of torque.
> >
> > --
> > Prentice
> >
> > Prentice Bisbal wrote:
> >> Is is possible to write job submission scripts using  
> >> torque_1.1.0p2? My
> >> cluster is old and about to be replaced, so there's no point in
> >> upgrading now, but I have a user who wrote a submit script in  
> >> Python to
> >> work around a bug we found in our antiquated version of torque.
> >>
> > _______________________________________________
> > torqueusers mailing list
> > torqueusers at supercluster.org
> > http://www.supercluster.org/mailman/listinfo/torqueusers
> >
> >
> 
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers
> 

----- End Original Message -----


More information about the torqueusers mailing list