Trees | Indices | Help |
|
---|
|
|
|||
JobcontrolException | |||
MissingFrontendException | |||
MissingHostsFileException | |||
_JobResourceHolder A helper class to deal with mmlib resource de-allocation. |
|||
_JobInitializer A class to handle class initialization and termination. |
|||
_JobManager | |||
Job A class to access a specific record in the job database. |
|||
_Backend An interface to mmjobbe. |
|||
Host A class to encapsulate host info from the schrodinger.hosts file. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__doc__ =
|
|||
_version = "$Revision: 1.105 $"
|
|||
logger = logging.getLogger("schrodinger.jobcontrol")
|
|||
profiling = os.getenv("JC_PROFILING", 0)
|
|||
jobid_re = re.compile(r"^JobId:\s+(\S+)", re.IGNORECASE | re.M
|
|||
timestamp_format = "%Y-%m-%d-%H:%M:%S"
|
|||
entry_fields = ["name", "base", "host", "nodelist", "user", "q
|
|||
field_sortkey = dict([(k, v) for(v, k) in enumerate(entry_fiel
|
|||
INSTALL_ROOT = "/opt/schrodinger"
|
|||
HOSTS_FILE = "schrodinger.hosts"
|
|||
_job_manager = _JobManager()
|
|||
_backend_singleton = None hash(x) |
|||
_backend_hosts = []
|
|
Return a list of Jobs in the database. The query can be "all" or "active"; otherwise, raises an Exception. |
Run a process under job control and return a Job object. For a process to be under job control, it must print a valid JobId: line to stdout. If such a line isn't printed, a RuntimeError will be raised. The cmd argument should be a list of command arguments (including the executable) as expected by the subprocess module. If the executable is present in $SCHRODINGER or $SCHRODINGER/utilities, an absolute path does not need to be specified.
|
A function to clean up the command passed to launch_job.
|
If the program executable doesn't exist as a file and isn't an absolute path, prepend the SCHRODINGER directory if it exists there. Return a list of command line arguments so this function can be used from launch_job when 'cmd' is a list. |
A convenience function to see if we're running under job control. If so, return a _Backend object. Otherwise, return None. |
Return the runtime path for the input file 'pathname'. If the pathname is of a type that job control will not copy to the job directory or no runtime file can be found, returns the original path name. |
Return the name of the schrodinger.hosts file last used by get_hosts(). The file is found using the standard search path ($SCHRODINGER_HOSTS, local dir, $HOME/.schrodinger, $SCHRODINGER). |
Return the pathname for the schrodinger.hosts file installed in the most recent previous installation directory we can find. If a root pathname is passed in, previous installations are searched for there. Otherwise, we look in the standard install locations. |
Return a list of all Hosts in the schrodinger.hosts file. After this is called, get_hostfile() will return the pathname for the schrodinger.hosts file that was used. |
Return a list of the given Host objects re-ordered to satisfy the conditions that, 1. the localhost entry (if any) is first, and 2. any entry used as a base entry is defined before it's used. Otherwise, the input order is preserved. |
Return a Host object for the named host. If the host is not found, we return a Host object with the provided name and details that match localhost. This matches behavior that jobcontrol uses. |
Return a Host object for 'name', with all attributes read in from the corresponding entry in schrodinger.hosts file. Requires that mmjob be initialized. |
Convert a hosts string (Ex: "galina:1 monica:4") to a list of tuples. First value of each tuple is the host, second value is # of cpus. |
Converts a hosts list (Ev: [ ('host1',1), ('host2', 10) ] ) to a string. Output example: "host1:1,host2:10" |
Return a list of (host, ncpu) tuples corresponding to the host list that is specified on the command line. This function is meant to be called by scripts that are running under a toplevel job control script but are not running under jlaunch. The host list is determined from the following sources:
If no SCHRODINGER_NODELIST is present in the environment, None is returned. |
Return a list of (host, ncpu) tuples corresponding to the host list as determined from the SCHRODINGER_NODEFILE. This function is meant to be called from scripts that are running under jlaunch (i.e. backend scripts). Returns None if SCHRODINGER_NODEFILE is not present in the environment. |
Derive the number of jobs from the specified host list. This function is useful to determine number of subjobs if user didn't specified the '-NJOBS' option. @type host_list: String or List of tuples @param host_list: String of hosts along with optional number of cpus or List of tuples consist of hosts along with optional number of cpus If host list is not specified then it uses get_command_line_host_list() to determine njobs, else uses the user provided host list. Please note: the host_list can be passes as string or as a list of tuples. For example: for -GLIDE_HOST "host1 host2:4" host_list would become [('host1', None), ('host2', 4)] |
|
__doc__
|
jobid_re
|
entry_fields
|
field_sortkey
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Aug 6 04:50:19 2015 | http://epydoc.sourceforge.net |