Modify

Opened 8 years ago

Last modified 7 years ago

#48 assigned enhancement

User job submission

Reported by: anonymous Owned by: bas
Priority: major Milestone:
Component: pbs Version: 4.4.0
Keywords: Cc: molden

Description

How can i implement the -A option in qsub, in pbs python?

Attachments (0)

Change History (6)

comment:1 Changed 8 years ago by bas

  • Status changed from new to assigned
  • Type changed from defect to enhancement

-A option is #define ATTR_A "Account_Name" for torque 2.5.X (source pbs_ifl.h)

attrl = pbs.new_attropl(1)
attrl[0].name = pbs.ATTR_A
attrl[0].value = "accountingB"

and the use pbs_sumbut function.

comment:2 Changed 8 years ago by bas

Did you try the proposed solution?

comment:3 Changed 7 years ago by anonymous

Somehow no job is submitted when I do like this:

attrl = pbs.new_attropl(2)
attrl[0].name = pbs.ATTR_A
attrl[0].value = "accountingB"

so

pbs.new_attropl(2)

instead of

pbs.new_attropl(1)

No errors are reported...

comment:4 Changed 7 years ago by bas

This is due to C <--> Python conversion. I don't do any boundary checking. So maybe some garbage is send and the conversion fails. I have to check this

comment:5 follow-up: Changed 7 years ago by molden

  • Cc molden added

OK so I guess I have to use pbs.new_attropl(1). I have tested this, this works.

comment:6 in reply to: ↑ 5 Changed 7 years ago by bas

Replying to molden:

OK so I guess I have to use pbs.new_attropl(1). I have tested this, this works.

If you only have to setup one attribute then this is the right approach. For multiple attributes you have to enlarge it:

  • 2 attributes --> attropl(2)

Add Comment

Modify Ticket

Change Properties
Action
as assigned The owner will remain bas.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bas to the specified user. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.