schrodinger.job.launchparams module

exception schrodinger.job.launchparams.ArgumentParserError

Bases: exceptions.Exception

class schrodinger.job.launchparams.LaunchParameters

Bases: object

These are parameters that can change with each job launch.

constructHostArg()
consumeCommandLine(cmdline)

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

:returns cmdline with options filtered out.

convertToEnv()

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

convertToJLaunchOptions()

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

Returns:list of str
getDebugLevel()

Returns debug level (integer)

getHostname()

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.

getJobname()

Return the jobname.

getLaunchDirectory()

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

getMaestroProjectDisposition()

:returns ProjectDisposition

getMaestroProjectDispositionString()

:returns str matching project disposition, appropriate for cmdline

getMaestroProjectName()

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

Returns:path to project
Return type:str
getMaestroViewname()

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

Returns:viewname name of panel
Return type:str
getNumberOfProcessorsManyNodes()

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

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

getNumberOfProcessorsOneNode()

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:number of processors requested for this job
Return type:int greater than 0
getNumberOfQueueSlots()

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.

getNumberOfSubjobs()

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.

getTPP()

Return the TPP option set by toplevel.py only.

setDebugLevel(debug_level)
Parameters:save (bool) – if True, copy back full output directory as zip
setDeleteAfterIncorporation(delete)
Parameters:delete (bool) – if True, the directory the job was launched from is deleted after incporation
setDetached(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
setHostname(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
setJobname(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
setLaunchDirectory(launch_directory)

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

setMaestroProjectDisposition(disp)

Mark the state of project incorporation.

Parameters:disp (ProjectDisposition) – should we incorporate?
setMaestroProjectName(project)

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

Parameters:project (str) – path to project
setMaestroViewname(viewname)

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

Parameters:viewname (str) – name of panel
setNumberOfProcessorsManyNodes(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
setNumberOfProcessorsOneNode(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
setNumberOfSubjobs(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
setOPLSDir(oplsdir)
setSaveAllJobOutput(save)
Parameters:save (bool) – if True, copy back full output directory as zip
setTPP(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.

verify()
class schrodinger.job.launchparams.ProjectDisposition

Bases: enum.Enum

ADDTOENTRY = 'addtoentry'
APPEND = 'append'
APPENDINPLACE = 'appendinplace'
APPENDUNGROUPED = 'appendungrouped'
APPEND_FIT = 'append:fit'
CUSTOM = 'custom'
IGNORE = 'ignore'
NONE = 'None'
REPLACE = 'replace'
WORKSPACE = 'workspace'