[torqueusers] torque APIs

Garrick Staples garrick at usc.edu
Tue Oct 18 13:28:07 MDT 2005


On Mon, Oct 17, 2005 at 06:42:33PM +0200, enrico.sirola at gmail.com alleged:
> Hello,
> is it possible to programmatically submit jobs with torque? I took a
> look at the torque documentation on supercluster.org, but I didn't
> find anything about APIs. Does anyone have a pointer to torque API
> docs? Thanks in advance,

Did you configure with --enable-docs?  Each function in the client API
has a manpage.  You can see the list of functions in pbs_ifl.h.  Also,
google for the PBS ERS (External Reference Specification).

Just take a look at the source for qsub.c.  Submitting a job isn't hard.
Just a pbs_connect() and a pbs_submit().

Using the PBS perl module (shameless plug, I'm the maintainer),
submitting a job is trivial:

#!/usr/bin/perl

use PBS;

$c=PBS::pbs_connect(PBS::pbs_default());
 $j=PBS::pbs_submit($c,
   {"Job_Name" => "test",
    "Resource_List.nodes" => "1",
    $PBS::ATTR_c => $PBS::CHECKPOINT_UNSPECIFIED,
    $PBS::ATTR_h => $PBS::NO_HOLD,
    $PBS::ATTR_j => $PBS::NO_JOIN,
    $PBS::ATTR_k=>$PBS::NO_KEEP,
    $PBS::ATTR_m=>$PBS::MAIL_AT_ABORT,
    $PBS::ATTR_p=>"0",
    $PBS::ATTR_r=>"TRUE"
   }, "/tmp/pbssubmit",undef,undef);
 print $j||PBS::pbs_geterrmsg($c),"\n";


> P.S.
> does a DRMAA implementation for torque exist? Is anyone working on it?

Search the mailing list archive.  There are references to people working
on it.

-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20051018/e5b13b0f/attachment.bin


More information about the torqueusers mailing list