Package schrodinger :: Package job :: Module launchparams :: Class LaunchParameters
[hide private]
[frames] | no frames]

Class LaunchParameters

object --+
         |
        LaunchParameters

These are parameters that can change with each job launch.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
setDebugLevel(self, debug_level)
 
getDebugLevel(self)
Returns debug level (integer)
 
setDeleteAfterIncorporation(self, delete)
 
setSaveAllJobOutput(self, save)
 
setLaunchDirectory(self, launch_directory)
Sets cwd for job launch.
 
getLaunchDirectory(self)
Sets cwd for job launch.
 
_setOriginalHosts(self, cmdline_str)
Sets the original string from the cmdline for the -HOST entry since it may include multiple entries.
 
_setDriverHostname(self, hostname)
Sets a DRIVERHOST hostname.
 
_setSubHost(self, hostname)
-HOST argument typically refers to the HOST that will run the driver.
 
setHostname(self, hostname)
Hostname is the name of the host to run the job on.
 
getHostname(self)
Returns hostname is the name of the host to run the job on.
 
setJobname(self, jobname)
Jobname is a non mandatory variable that can be used to indicate name of job in job record.
str
getMaestroViewname(self)
Viewname is used by a maestro panel to identify a job as belonging to a panel.
 
setMaestroViewname(self, viewname)
Viewname is used by a maestro panel to identify a job as belonging to a panel.
 
getMaestroProjectDisposition(self)
@returns ProjectDisposition
 
getMaestroProjectDispositionString(self)
@returns str matching project disposition, appropriate for cmdline
 
setMaestroProjectDisposition(self, disp)
Mark the state of project incorporation.
 
getMaestroProjectName(self)
Returns associated project for a job, marking which project should do the incorporation of results.
 
setMaestroProjectName(self, project)
Set associated project for a job, marking which project should do the incorporation of results.
 
setNumberOfProcessorsManyNodes(self, nprocessors)
Set number of processors to allocate to a job.
 
setNumberOfSubjobs(self, nsubjobs)
Set number of subjobs that a job could run.
 
getNumberOfProcessorsManyNodes(self)
Get number of processors to allocate to a job.
 
getNumberOfSubjobs(self)
Get number of subjobs that a job may run.
 
setNumberOfProcessorsOneNode(self, nprocessors)
Set number of processors on one node.
int greater than 0
getNumberOfProcessorsOneNode(self)
Return number of processors on one node.
 
setDetached(self, detached)
Set job to run detached, keeping the files on the remote server until explicitly downloaded.
 
getTPP(self)
Return the TPP option set by toplevel.py only.
 
setTPP(self, tpp)
Sets the TPP option on the cmdline.
 
setOPLSDir(self, oplsdir)
 
getNumberOfQueueSlots(self)
Return the number of slots we need to request for the queueing system.
 
verify(self)
 
constructHostArg(self)
 
convertToJLaunchOptions(self)
Validate state of Launch Parameters (may throw RuntimeError) and return list of cmdline parameters.
 
convertToEnv(self)
Converts LaunchParameters to environment.
 
consumeCommandLine(self, cmdline)
This consumes arguments from cmdline.

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

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)

setDebugLevel(self, debug_level)

 
Parameters:
  • save (bool) - if True, copy back full output directory as zip

setDeleteAfterIncorporation(self, delete)

 
Parameters:
  • delete (bool) - if True, the directory the job was launched from is deleted after incporation

setSaveAllJobOutput(self, save)

 
Parameters:
  • save (bool) - if True, copy back full output directory as zip

setLaunchDirectory(self, launch_directory)

 

Sets cwd for job launch. This avoids a chdir command before calling launch potentially allowing for more than one launch from maestro.

getLaunchDirectory(self)

 

Sets cwd for job launch. This avoids a chdir command before calling launch potentially allowing for more than one launch from maestro.

_setDriverHostname(self, hostname)

 

Sets a DRIVERHOST hostname. This is an artifact of when we supported remote and local drivers.

NOTE: This option is ONLY utilized by toplevel.py since it only is used as an environment variable

_setSubHost(self, hostname)

 

-HOST argument typically refers to the HOST that will run the driver. This host is used to run subjobs.

NOTE: This option is ONLY utilized by toplevel.py since it only is used as an environment variable

setHostname(self, hostname)

 

Hostname is the name of the host to run the job on. This name needs to correspond to something in schrodinger.hosts file or DNS-resolveable.

Parameters:
  • hostname (str) - name of host

getHostname(self)

 

Returns hostname is the name of the host to run the job on. This name needs to correspond to something in schrodinger.hosts file or DNS-resolveable.

setJobname(self, jobname)

 

Jobname is a non mandatory variable that can be used to indicate name of job in job record.

Parameters:
  • jobname (str) - name of job

getMaestroViewname(self)

 

Viewname is used by a maestro panel to identify a job as belonging to a panel.

Returns: str
viewname name of panel

setMaestroViewname(self, viewname)

 

Viewname is used by a maestro panel to identify a job as belonging to a panel.

Parameters:
  • viewname (str) - name of panel

setMaestroProjectDisposition(self, disp)

 

Mark the state of project incorporation.

Parameters:
  • disp (ProjectDisposition) - should we incorporate?

getMaestroProjectName(self)

 

Returns associated project for a job, marking which project should do the incorporation of results.

Returns:
path to project @rtype str

setMaestroProjectName(self, project)

 

Set associated project for a job, marking which project should do the incorporation of results.

Parameters:
  • project (str) - path to project

setNumberOfProcessorsManyNodes(self, nprocessors)

 

Set number of processors to allocate to a job. These may be across multiple nodes. Used by MPI jobs to indicate how many processors the queuing system needs to allocate.

Parameters:
  • nprocessors (int greater than 0) - number of processors requested for this job

setNumberOfSubjobs(self, nsubjobs)

 

Set number of subjobs that a job could run. This is used by workflow jobs to indicate that a driver job might run and use subjobs. This value is NOT used by the queueing system, but can be accessed from inside the job.

Parameters:
  • nsubjobs - number of subjobs
  • nprocesses (int greater than 0)

getNumberOfProcessorsManyNodes(self)

 

Get number of processors to allocate to a job. Used by MPI jobs.

For example 4 processors = 4 nodes allocated by single jobs.

getNumberOfSubjobs(self)

 

Get number of subjobs that a job may run. This value is used by product backend (not jobcontrol).

In a workflow job, 4 process = 4 jobs running simultaneously.

setNumberOfProcessorsOneNode(self, nprocessors)

 

Set number of processors on one node. Useful for OpenMP-type jobs, indicates to the queueing system to allocate the requisite number of processors on the same node..

Parameters:
  • nprocessors (int greater than 0) - number of processors requested for this job

getNumberOfProcessorsOneNode(self)

 

Return number of processors on one node. Useful for OpenMP-type jobs, indicates to the queueing system to allocate the requisite number of processors on the same node.

Returns: int greater than 0
number of processors requested for this job

setDetached(self, detached)

 

Set job to run detached, keeping the files on the remote server until explicitly downloaded. Only valid if your launching host machine has serverhost: in schrodinger.hosts entry (and serverhost is configured correctly)

Parameters:
  • detached (boolean) - allow running disconnected from network

setTPP(self, tpp)

 

Sets the TPP option on the cmdline. This will not be used by the parent job unless jobUsesTPP is set in the job specification.

getNumberOfQueueSlots(self)

 

Return the number of slots we need to request for the queueing system. This value current maps to NPROC. If we don't know how many, return None.

convertToJLaunchOptions(self)

 

Validate state of Launch Parameters (may throw RuntimeError) and return list of cmdline parameters.

Returns:
list of str

convertToEnv(self)

 

Converts LaunchParameters to environment. Not all parameters are supported. This option should be limited to use by toplevel.py if possible.

consumeCommandLine(self, cmdline)

 

This consumes arguments from cmdline. The primary purpose is to consume arguments from toplevel $SCHRODINGER/run.

@returns cmdline with options filtered out.