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

Class JobSpecification

object --+
         |
        JobSpecification

This class provides a serializable job definiton and consists of a task specification along with runtime parameters.

Currently unsupported features:

Features that will probably never be supported:

Instance Methods [hide private]
 
__init__(self, task_spec, runtime_params)
x.__init__(...) initializes x; see help(type(x)) for signature
 
asJSON(self, **kwargs)
 
_validate(self)
Validate that all the necessary inputs are present in the runtime parameters.
 
_validateOutputFilenames(self)
Check for runtime name collisions.
 
_getKeyValue(self, match)
Return the value of the key in the provided match object.
 
_subInputOrJobname(self, string)
Replace template keys with the appropriate values.
 
getCommand(self)
Return the shell command that will run the job.
 
getOutputFile(self, key, stream=None, incorporate=None)
Get the output file corresponding to the given key from the job specification.
 
getOutputFiles(self, stream=None, incorporate=None)
Get all the output files from the job specification.
 
_getRedirect(self, key)
 
getStderr(self)
 
getStdout(self)
 
getDefaultStderr(self)
 
getDefaultStdout(self)
 
useSchrodingerRun(self)
 
getInputFiles(self)
 
getHost(self)
 
debugEnabled(self)
 
getJobname(self)
 
getProgramName(self)
 
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.
 
getLicenses(self)
Returns licenses as a list of tuples of ( license_name, num_tokens)

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

Static Methods [hide private]
 
fromJSON(json_job_spec)
Return a JobSpecification instance created from the provided JSON.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, task_spec, runtime_params)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

_validate(self)

 

Validate that all the necessary inputs are present in the runtime parameters. Raise RuntimeParametersError if not.

_getKeyValue(self, match)

 

Return the value of the key in the provided match object.

Parameters:
  • match (re.MatchObject) - A match of a template key.

getCommand(self)

 

Return the shell command that will run the job.

Returns:
list of str

getOutputFile(self, key, stream=None, incorporate=None)

 

Get the output file corresponding to the given key from the job specification.

Parameters:
  • stream - If stream=True, the file is returned only if it is a log file. If stream=False, the file is returned only if it is an output file. If stream=None, the file is returned.

getOutputFiles(self, stream=None, incorporate=None)

 

Get all the output files from the job specification.

Parameters:
  • stream (True, False or None(Default)) - If stream=None, both ouput and log files are returned. If stream=True, only log files are returned. If stream=False, only output files are returned. Defaults to None. Optional.
  • incorporate - If incorporate=None, incorporatable and other files are returned. If incorporate=True, only files to be incorporated are returned. If incoporate=False, only output files not incorporated are returned.

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 uses TPP as an option to pass along to subjobs