Classes and functions for managing a cluster of compute nodes via SSH.
Provides a builder syntax for constructing job lists.
Add information for a new job specification.
| Parameters: |
|
|---|
Generate the list of job specs described by previous calls to this object.
Set the default number of times to replicate a job.
Run a single command on local machine, returning stdout.
This function throws an exception if the command fails.
| Parameters: |
|
|---|
Open a pipe via SSH, execute given commands, close the pipe, and return stdout.
| Parameters: |
|
|---|
Note
Requires that the command ‘ssh’ be on the local path.
Copy a set of files to a remote node.
| Parameters: |
|
|---|
Note
Requires that the command ‘scp’ be on the local path.
The record of a job, including its spec and ID.
Node on which this job is running.
Unique identifier for this job.
Describes the commands necessary to launch a job.
(list of str) Path to binary, and arguments.
(list of str) Path to files needed to run command.
(str) Name of job, for debugging.
Manager that logs job events to disk.
Event handler, called when job completes.
Event handler, called when job begins.
Event handler, called when manager waits on finished jobs.
(bool) Flag indicating that the last activity was a sleep event.
(file) Destination for logging messages.
Allocates N jobs to M hosts, with N > M.
Event handler, called when job completes.
Event handler, called when job begins.
Event handler, called when manager waits on finished jobs.
Launch the next job in the queue on a free host.
Run all jobs in the queue, blocking until they finish.
Initialize the manager to process a set of jobs.
| Parameters: |
|
|---|
Poll hosts for job status
| Returns: | True if any job has finished. |
|---|---|
| Return type: | bool |
Handles remote command invocations.
Get the set of hosts in the network.
Get the current state for a list of jobs.
Get job data that was written to the standard error stream.
Get job data that was written to the standard output stream.
Start a job on a remote host, returning the allocated job ID.
Requires that the command ‘gjob’ be on the remote path of the worker node. The set of job commands is launched as a bash script.
Maintains the state for each element in a fixed list of objects.
Determine if all objects are in given state.
Determine if any objects are in given state.
Choose first object in given state.
Choose random object in given state.
Get list of objects in given state.
Set the state of an object.
| Parameters: |
|
|---|
Set of all resource states.
Resource is in use (not ready).
A single-use resource has been consumed.
Resource is not ready because an error occured.
Resource is ready for use.
Resource is in an unknown state. This is usually treated as an error.
Write data stored in memory to a file on a remote node.
| Parameters: |
|
|---|
Note
Requires that the command ‘ssh’ be on the local path.