IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 4, 2012, 1:00:56 PM (14 years ago)
Author:
eugene
Message:

update text on pantasks/controller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905/Ohana/src/opihi/doc/pantasks.controller.txt

    r34495 r34508  
    181181   readline timeout.
    182182 
    183 
    184183[1] : note that the command 'controller status' includes the job and
    185184host ID values in the form X.X.X.X where X is a hexidecimal number.
    186185Unfortunately, pcontrol does not understand this format for the IDs
    187186for the 'check' command.   
     187
     188--
     189
     190Pantasks / Controller Interactions
     191
     192Pantasks Threads & Controller Interactions
     193
     194Pantasks has a server/client mode and a stand-alone mode.  These share
     195the bulk of code, but there are some minor difference.  In stand-alone
     196mode, there are 3 active threads.  The main thread interprets the
     197commands (accepted by readline); a second thread manages the tasks and
     198jobs known to pantasks; the third thread manages interactions with the
     199parallel controller.   In server/client mode, a fourth thread manages
     200the communcations with the remote clients. 
     201
     202The task/job thread is responsible for monitoring the task rules and
     203constructing the commands which corresponds to jobs when appropriate.
     204Those jobs which are defined to be local are executed on the local
     205machine, while remote jobs are sent to the thread which interacts with
     206the parallel controller.
     207
     208The primary job of the controller thread is to monitor the status of
     209jobs submitted to the controller and to harvest jobs which have
     210finished.  A secondary job is to flush the stdout and stderr buffers
     211of the pantasks / pcontrol connection. 
     212
     213Jobs are submitted to the controller directly by the Task/Job thread.
     214Other operations, check as manual checks of the job status are
     215performed by the main thread.
     216
     217Commands send to pcontrol:
     218
     219In addition to the user-level commands discussed above, the following
     220messages are sent to the controller:
     221
     222* jobstack exit : the controller thread checks for the set of completed
     223  jobs (which did not crash) by sending this command.  The response is
     224  a list of jobs ready for harvest.
     225
     226* jobstack crash : the controller thread checks for the set of
     227  complete jobs which crashed by sending this command.  The response
     228  is a list of jobs ready for harvest.
     229
     230* delete : jobs which have completed and for which the stderr/stdout
     231  have been received can be deleted from the controller.  For
     232  'pcontrol', this is necessary to free up resources managing the
     233  specific job.
     234
     235* check job : once the controller gets a list of jobs which have
     236  exited or crashed, pantasks loops over those jobs, harvesting their
     237  results.  this command is used to get the needed stats (size of
     238  stderr buffer, size of stdout buffer, exit status, etc). 
     239
     240* job : Submit a job to the controller.  this command is used by the
     241  function SubmitControllerJob to send a new job to the controller.
     242  the function appends options such as +host, -nice as needed.  the
     243  function expects to receive a job ID from the controller for future
     244  interactions.
     245
     246* quit : shutdown the controller
     247
     248---
     249
     250pantasks & condor
     251
     252There are three classes of pcontrol operations which pantasks
     253currently perform:
     254
     255* submit jobs to pcontrol
     256* detect completion and harvest job output
     257* manage the hosts used by pcontrol
     258
     259The communication between pantasks and pcontrol uses a pipe; pcontrol
     260is run as a forked child of pantasks.  The communication is done via
     261text blocks with fairly minimal hand-shaking. 
     262
     263If pantasks is integrated with condor, it is critical that it be able
     264to perform the first two of these functions.  It is not required that
     265pantasks manage the condor hosts.
     266
     267Condor client / server interaction could be performed via forked
     268commands or we could use the SOAP interface.  I suspect that SOAP will
     269be more effective for the high-rate job harvesting process.
     270
     271However jobs are submitted to condor, it is critical that condor be
     272able to respect the limit on the number of mistargeted jobs currently
     273active.
Note: See TracChangeset for help on using the changeset viewer.