Author Topic: Pgroups  (Read 10869 times)

connnor.v

  • Full Member
  • ***
  • Posts: 10
Pgroups
« on: April 12, 2013, 05:09:02 PM »
Hi there,

Can anyone tell me how pgroups work? I would love all layer submissions from the same Maya file to all submit under a common pgroup name, mainly for ease of filtering and monitoring using the GUI. Can anyone explain to me in detail how I could add this feature to cmdline code? I haven't been able to find much information on this in the documentation.

jburk

  • Administrator
  • *****
  • Posts: 493
Re: Pgroups
« Reply #1 on: April 12, 2013, 11:35:52 PM »
Are you building and submitting jobs with the API or from a shell script?

If the api, build each job, add it to a list, and then submit the list; all jobs will then have the same pgrp, which will be set to the job id of the first job in the list (the 'pgrp leader' is the job whose id matches the pgrp).  The qb python module's qb.submit works like this:

Code: [Select]
import qb

jobA = { ... }
jobB = { ... }

submitted = qb.submit( [jobA, jobB] )

for j in submitted:
    print '%(id)s: %(name)s' % j


If you're doing submission with the cmdline, you submit the first job, retrieve the submitted job's id, then pass that id to the qbsub --prgrp <id> .... command.