Before proceeding with this section, the reader should ensure they are familiar with the recipe author’s perspective on how tasks can be distributed within the pipeline framework. This section will describe in detail what goes on behind the scenes and how it can be extended.
Todo
Details!
Base class for node jobs called through IPython or directly via SSH.
Sets up TCP based logging.
Calls the run() method, ensuring that the logging handler is added and removed properly.
This node script extends LOFARnode to receive instructions via TCP from a JobSocketReceiver.
After fetching arguments remotely, use them to run the standard run_with_logging() method.
Container for information about a job to be dispatched to a compute node.
Parameters: |
|
---|
Dispatch this job to the relevant compute node.
Note that error is an instance of threading.Event, which will be set if the remote job fails for some reason.
Provide a dictionary-like structure of bounded semaphores with arbitrary keys.
This gives a convenient way to keep tabs on the number of simultaneous jobs running on a given host.
Parameters: | nproc (integer or none) – Bound value for semaphore (ie, maximum number of jobs) |
---|
Todo
Extenting this system.
Dispatch mechanism can be specified in the remote section of the pipeline configuration
Run command on host, passing it arguments from the arguments list and exporting key/value pairs from env(a dictionary).
Returns an object with poll() and communicate() methods, similar to subprocess.Popen.
This is a generic interface to potentially multiple ways of running commands (SSH, mpirun, etc). The appropriate method is chosen from the config block supplied (with SSH as a fallback).
Dispatch a remote command via mpirun.
Return a Popen object pointing at the MPI command, to which we add a kill method for shutting down the connection if required.
Dispatch a remote command via paramiko.
We return an instance of ParamikoWrapper.
Sends an SSH command to a host using paramiko, then emulates a Popen-like interface so that we can pass it back to pipeline recipes.
Provides a context in which job dispatch is available.
Yields a host name & port which clients can connect to for job details.
Bases: SocketServer.ThreadingTCPServer
Simple TCP socket-based job dispatch and results collection as well as network logging.
Bases: SocketServer.StreamRequestHandler
Networked job server.
This will listen for:
Log records are logs using whatever local logger is supploed to the SocketReceiver.
Start and watch a pool of threads. If an exception is thrown during processing, set the killswitch so that all threads can shut down cleanly, then join all the threads to wait for them to finish.
Parameters: |
|
---|