[torqueusers] pbs_submit - the simplest scenario?

Garrick Staples garrick at clusterresources.com
Mon Aug 21 10:41:57 MDT 2006


On Fri, Aug 18, 2006 at 03:29:09PM +0200, Marcin Grabda alleged:
> Hi there.
> 
> I'm trying to submit job using PBS C API provided by torque 2.1.2, but I
> find some problems.
> 
> In my program, I'm calling pbs_connect, and right after that pbs_submit.
> The second call returns NULL, pbs_errno is also set to  "PBSE_BADUSER   
> 15023            Bad user - no password entry".
> 
> I'm calling pbs_submit something like that:
> 
> pbs_submit(_connect, attrs, "/home/grabka/work/test.sh", NULL, NULL);
> 
> In attrs list there are nine attributes set: "Checkpoint", "Hold_Types",
> "Join_Path", "Keep_Files", "Mail_Points", "Priority", "Rerunable",
> "Job_Name", "Resource_List.nodes". All are set to default values, except
> last two of course.
> 
> Does somebody can tell me, please, what am I missing? I've also tried to
> change NULL values to "", but it didn't help.

It looks like you've already worked through the minimum.  This is the
demo pbs_submit() perl script:

use PBS;

$c=PBS::pbs_connect(PBS::pbs_default());
$j=PBS::pbs_submit($c,
   {$PBS_ATTR_N => "test",
    $PBS_ATTR_l.".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";



More information about the torqueusers mailing list