Package schrodinger :: Package job :: Module launchapi :: Class TaskSpecification
[hide private]
[frames] | no frames]

Class TaskSpecification

object --+
         |
        TaskSpecification

A class that holds the information necessary to run a task on a compute resource.

It holds a templated shell command along with info about required input, output created, and information about how to generate a jobname. It doesn't hold any information specific to a job run - e.g. hostname, input filenames, output filenames.

This class has no methods that modify instance state. Use a builder class (TaskSpecificationBuilder or JobSpecificationBuilder) to set up a TaskSpecification.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
validate(self)
Make sure that the variables used in the command-line template are defined with input or output specifications.
 
asJSON(self, **kwargs)
 
getCommandTemplate(self)
Return the command-line as a list of arguments with keys in the form of <KEY> that will be replaced with runtime parameters.
 
needsExplicitJobname(self)
Return True if a jobname must be specified as part of the runtime parameters.
 
getInputKeys(self)
Return a list of keys that define inputs.
 
getJobnameSource(self)
Return the input key that should be used to derive the jobname.
 
getProgramName(self)
 
getLicenses(self)
Returns licenses as a list of tuples of ( license_name, num_tokens)
 
driverReservesCores(self)
If True, the driver will allocate N slots matching -HOST hostname: N processes.
 
jobUsesTPP(self)
If True, this job will allocate N slots on one node matching -TPP N.
 
getOutputKeys(self)
Return a list of keys that define outputs.
 
useSchrodingerRun(self)
Return whether to run the command under $SCHRODINGER/run.
 
useSchrodingerProduct(self)
Return whether to run the command under $SCHRODINGER/run.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
fromJSON(json_spec)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

validate(self)

 

Make sure that the variables used in the command-line template are defined with input or output specifications. Raise a TaskSpecificationError if not.

driverReservesCores(self)

 

If True, the driver will allocate N slots matching -HOST hostname: N processes. This is useful when the driver allocates parallel slots on one node so it can resubmit jobs to localhost. If no N is specified, assume to be 1.

This is an optimization to avoid resubmission back to the queue if we know we are running a set of parallel jobs with the same CPU requirements.

jobUsesTPP(self)

 

If True, this job will allocate N slots on one node matching -TPP N.

If False, this job only passes TPP on as an option for subjobs.

TPP stands for Threads Per Process.