schrodinger.job.launchparams module¶
-
class
schrodinger.job.launchparams.ProjectDisposition(value)[source]¶ Bases:
enum.EnumAn enumeration.
-
NONE= 'None'¶
-
APPEND= 'append'¶
-
APPENDNEW= 'appendnew'¶
-
APPEND_FIT= 'append:fit'¶
-
IGNORE= 'ignore'¶
-
CUSTOM= 'custom'¶
-
ADDTOENTRY= 'addtoentry'¶
-
APPENDINPLACE= 'appendinplace'¶
-
APPENDINPLACE_FIT= 'appendinplace:fit'¶
-
APPENDUNGROUPED= 'appendungrouped'¶
-
REPLACE= 'replace'¶
-
REPLACE_FIT= 'replace:fit'¶
-
WORKSPACE= 'workspace'¶
-
-
class
schrodinger.job.launchparams.LaunchParameters[source]¶ Bases:
objectThese are parameters that can change with each job launch.
-
setDebugLevel(debug_level)[source]¶ - Parameters
save (bool) – if True, copy back full output directory as zip
-
setDeleteAfterIncorporation(delete)[source]¶ - Parameters
delete (bool) – if True, the directory the job was launched from is deleted after incporation
-
setSaveAllJobOutput(save)[source]¶ - Parameters
save (bool) – if True, copy back full output directory as zip
-
setLaunchDirectory(launch_directory)[source]¶ Sets cwd for job launch. This avoids a chdir command before calling launch potentially allowing for more than one launch from maestro.
-
getLaunchDirectory()[source]¶ Sets cwd for job launch. This avoids a chdir command before calling launch potentially allowing for more than one launch from maestro.
-
setHostname(hostname)[source]¶ 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()[source]¶ 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.
-
getSubHostName() → Optional[str][source]¶ Returns None if -SUBHOST isn’t set and the hostname if -SUBHOST is set.
-
setJobname(jobname)[source]¶ 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()[source]¶ Viewname is used by a maestro panel to identify a job as belonging to a panel.
- Returns
viewname name of panel
- Return type
str
-
setMaestroViewname(viewname)[source]¶ Viewname is used by a maestro panel to identify a job as belonging to a panel.
- Parameters
viewname (str) – name of panel
-
getMaestroProjectDispositionString()[source]¶ :returns str matching project disposition, appropriate for cmdline
-
setMaestroProjectDisposition(disp)[source]¶ Mark the state of project incorporation.
- Parameters
disp (ProjectDisposition) – should we incorporate?
-
getMaestroProjectName()[source]¶ Returns associated project for a job, marking which project should do the incorporation of results.
- Returns
path to project
- Return type
str
-
setMaestroProjectName(project)[source]¶ Set associated project for a job, marking which project should do the incorporation of results.
- Parameters
project (str) – path to project
-
setNumberOfProcessorsManyNodes(nprocessors)[source]¶ 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(nsubjobs)[source]¶ 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
-
getNumberOfProcessorsManyNodes()[source]¶ Get number of processors to allocate to a job. Used by MPI jobs.
For example 4 processors = 4 nodes allocated by single jobs.
-
getNumberOfSubjobs()[source]¶ 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(nprocessors)[source]¶ 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()[source]¶ 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
-
setTPP(tpp)[source]¶ 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()[source]¶ 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()[source]¶ Validate state of Launch Parameters (may throw RuntimeError) and return list of cmdline parameters.
- Returns
list of str
-