IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2006, 12:58:19 AM (21 years ago)
Author:
eugene
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pantasks/pantasks.tex

    r6033 r6055  
    2424tool which manages the sequencing of data analysis steps and, with the
    2525related tool `PControl', distributes the data processing across a
    26 cluster of computers.
     26cluster of computers. \tbd{uses the 'opihi' shell-scripting system}
    2727
    2828The purpose of PanTasks is to manage the automatic construction and
     
    3030uses a set of rules to define UNIX commands, and their corresponding
    3131command-line arguments, to be performed on some regular, repeated
    32 basis.  The utility of PanTasks is that it can easily define an
    33 analysis system which is completely state-based, as opposed to an
    34 event-driven system. 
    35 
    36 The two basic units of PanTasks operation are the 'task' and the
    37 'job'.  A 'job' is simply a command the user would execute on a
    38 command line; it consists of a command along with optional command
    39 line arguments.  A 'task' is a generic description of a type of job in
    40 which the details of any specific piece of data are omitted.  The task
    41 defines the UNIX command which corresponds to the job, and it provides
    42 rules for determining the identity of data for the job.  The task also
    43 defines tests which are used to decide if the job may be executed.
    44 Finally, it defines a polling frequency in which PanTasks should
    45 attempt to construct a new job for the task.
    46 
    47 For example, we may want to regularly copy files from one location to
    48 another.  Perhaps the name of the next available file is available in
    49 a database table, and can be retrieved with the command 'nextFile'.
    50 Perhaps we wish to check for new files every 60 seconds.  Thus, the
    51 task is to copy files, while a specific job of this task might be of
    52 the form \code{cp newfile newpath}.  With PanTasks, we would define a
    53 copy task somewhat like the following:
    54 
    55 \begin{verbatim}
    56   task copyfile
    57     periods -exec 60.0
    58 
    59     task.exec
    60       $file = `nextFile`
    61       if ($file == "none")
    62         break
    63       end
    64       command cp $file $newpath
    65     end
    66 
    67     task.exit 0
    68       queuepush copied $file
    69     end
    70 
    71     task.exit 1
    72       queuepush failure $file
    73     end
    74   end
    75 \end{verbatim}
    76 
    77 In this simple example, the task is attempted every 60 seconds.  If
    78 there is no new file (output of 'nextFile' is 'none'), then no job
    79 results from this task.  If there is a new file, the copy command is
    80 performed.  This example is deceptively simple because one could
    81 easily imagine writing a stand-along program which performs the same
    82 thing.  The important advantages of using PanTasks for this type of
    83 operation are:
    84 \begin{itemize}
    85 \item the output from one job can be used to spawn a number of other tasks.
    86 \item the success or failure state of each job can be used to spawn
    87   other tasks.
    88 \item the details of the job and data test are kept separated from the
    89   rules which connect tasks together. 
    90 \item the relationships between tasks are kept together in a single
    91   location.
    92 \end{itemize}
    93 
    94 In addition to these organizational advantages, PanTasks also provides
    95 a direct connection to the tool for monitoring parallel jobs,
    96 pcontrol.  Thus the jobs spawned by PanTasks can be defined to run in
    97 the background locally or on any of the computers in the parallel
    98 processing cluster.
    99 
    100 
    101 \section{PanTasks : the Scheduler}
    102 
    103 The purpose of PanTasks is to manage the automatic construction and
    104 execution of inter-related (often repetative) operations. PanTasks uses
    105 a set of rules to define UNIX commands, and their corresponding
    106 command-line arguments, to be performed on some regular, repeated
    107 basis. The utility of PanTasks is that it can easily define an analysis
    108 system which is completely state-based, as opposed to an event-driven
    109 system.
     32basis.  The utility of PanTasks is that it can easily define and
     33manage an analysis system which is completely state-based, as opposed
     34to an event-driven system.
    11035
    11136Consider, for example, a telescope which obtains a collection of
     
    14974\subsection{Tasks vs Jobs}
    15075
    151 The primary function of PanTasks is to repeatedly perform tasks, and
    152 execute jobs on the basis of those tasks. A task consists of a set of
    153 rules which describe system state tests to perform on a regular time
    154 scale. Based on the results of those state tests, the task will then
    155 choose whether or not to construct a job. The task also defines
    156 actions to perform upon the completion of a job, based upon the output
    157 and exit status of the job. A task thus defines the repeat period. It
    158 may optionally define valid or invalid time ranges (eg, Mon-Fri or
    159 10:00-17:00, etc). The task may also specify that the job be run
    160 locally (ie, in the background on the same computer as PanTasks) or
    161 remotely by the parallel process controller (pcontrol). A job may even
    162 be restricted to a specific computer managed by pcontrol. An example
    163 of a simple tasks is given below.
    164 
    165 \begin{verbatim}
    166    task datalist
    167      command ls /data/foo
    168      periods -exec 5.0
    169      periods -timeout 50.0
    170      periods -poll 1.0
    171  
    172      task.exit 0
    173        queueprint stdout
    174        queuedelete stdout
    175      end
    176  
    177      task.exit 1
    178        queuepush failure "task failed"
    179      end
    180    end
    181  \end{verbatim}
    182 
    183 
    184 This task does not perform any system state tests; it is simply
    185 constructs a new job every 5.0 seconds. The job in this case is always
    186 the same: ls /data/foo . When the job finished, if the job exit status
    187 is 0 (normal UNIX success status), the resulting output is printed to
    188 the screen. If the job returns an exit status of 1 (a failure), the
    189 failure queue receives a single entry. Although they are not defined
    190 in this case, it is also possible to specify the action to be taken if
    191 the job crashes (does not exit normally) or if it times out (runs
    192 beyond the specified timeout period). A slightly more complex task
    193 which performs a state test and constructs a command based on that
    194 test is shown below
    195 
    196 \begin{verbatim}
    197    task datalist
    198      periods -exec 5.0
    199      periods -timeout 50.0
    200      periods -poll 1.0
    201  
    202      task.exec
    203        $file = `next.file`
    204        if ($file == "none")
    205          break
    206        end
    207        command cp /data/foo/$file /data/bar
    208      end
    209  
    210      task.exit 0
    211        queueprint stdout
    212        queuedelete stdout
    213        queuepush copied $file
    214      end
    215  
    216      task.exit 1
    217        queuepush failure $file
    218      end
    219    end
    220 \end{verbatim}
    221 
    222  The task.exec macro is executed by PanTasks every 5.0 seconds. This
    223  macro executes a (hypothetical user-defined) UNIX command (next.file)
    224  which examines the system state, return either a filename or the word
    225  "none". If the result of this test is "none", the task does nothing:
    226  no job is constructed. Otherwise, a job is constructed using the name
    227  of the file returned by the state test. Successful jobs have the
    228  filename added to the 'copied' queue, while failed jobs add the
    229  filename to the 'failure' queue.
     76The two basic units of PanTasks operation are the 'task' and the
     77'job'.  A 'job' is simply a command the user would execute on a
     78command line; it consists of a command along with optional command
     79line arguments.  A 'task' is a generic description of a type of job in
     80which the details of any specific piece of data are omitted.  The task
     81defines the UNIX command which corresponds to the job, and it provides
     82rules for determining the identity of data for the job.  The task also
     83defines tests which are used to decide if the job may be executed.
     84Finally, it defines a polling frequency in which PanTasks should
     85attempt to construct a new job for the task.
     86
     87For example, we may want to regularly copy files from one location to
     88another.  Perhaps the name of the next available file is available in
     89a database table, and can be retrieved with the command 'nextFile'.
     90Perhaps we wish to check for new files every 60 seconds.  Thus, the
     91task is to copy files, while a specific job of this task might be of
     92the form \code{cp newfile newpath}.  With PanTasks, we would define a
     93copy task somewhat like the following:
     94
     95\begin{verbatim}
     96  task copyfile
     97    periods -exec 60.0
     98
     99    task.exec
     100      $file = `nextFile`
     101      if ($file == "none")
     102        break
     103      end
     104      command cp $file $newpath
     105    end
     106
     107    task.exit 0
     108      queuepush copied $file
     109    end
     110
     111    task.exit 1
     112      queuepush failure $file
     113    end
     114  end
     115\end{verbatim}
     116
     117In this simple example, the task is attempted every 60 seconds.  If
     118there is no new file (output of 'nextFile' is 'none'), then no job
     119results from this task.  If there is a new file, the copy command is
     120performed.  This example is deceptively simple because one could
     121easily imagine writing a stand-along program which performs the same
     122thing.  The important advantages of using PanTasks for this type of
     123operation are:
     124\begin{itemize}
     125\item the output from one job can be used to spawn a number of other tasks.
     126\item the success or failure state of each job can be used to spawn
     127  other tasks.
     128\item the details of the job and data test are kept separated from the
     129  rules which connect tasks together. 
     130\item the relationships between tasks are kept together in a single
     131  location.
     132\end{itemize}
     133
     134In addition to these organizational advantages, PanTasks also provides
     135a direct connection to the tool for monitoring parallel jobs,
     136pcontrol.  Thus the jobs spawned by PanTasks can be defined to run in
     137the background locally or on any of the computers in the parallel
     138processing cluster.
    230139
    231140\subsection{Parallel vs Local Job Processing}
    232141
    233142Jobs which are generated by PanTasks tasks may either be run locally
    234 (forked in the background on the same machine as PanTasks) or run on the
    235 IPP parallel process controller, pcontrol. The default is for the job
    236 to be run locally. If a job should be run on the parallel controller,
    237 this can be specified by including the command host (hostname) in the
    238 definition of a task. If the value of (hostname) is 'anyhost', then
    239 pcontrol may select any of its host computers to run the job according
    240 to its own rules. If the value of (hostname) is one of the computers
    241 managed by pcontrol, then that machine will be selected for the job,
    242 if it is available. This amounts to a preference to use that machine,
    243 but pcontrol is allowed to substitute a different machine if it
    244 chooses. If the host command is given the option -required, then
    245 pcontrol is forced to use the named host, even if the machine is down,
    246 unknown, or otherwise unavailable. If the machine is not available,
    247 pcontrol will simply hold onto the job until the machine is available
    248 or the job is deleted. Note that PanTasks may delete jobs from pcontrol
    249 if they remain pending for too long (see period -timeout).
     143(forked in the background on the same machine as PanTasks) or run on
     144the IPP parallel process controller, pcontrol. The default is for the
     145job to be run locally. If a job should be run on the parallel
     146controller, this can be specified by including the command host
     147(hostname) in the definition of a task. If the value of (hostname) is
     148'anyhost', then pcontrol may select any of its host computers to run
     149the job according to its own rules. If the value of (hostname) is one
     150of the computers managed by pcontrol, then that machine will be
     151selected for the job, if it is available. This amounts to a preference
     152to use that machine, but pcontrol is allowed to substitute a different
     153machine if it chooses. If the host command is given the option
     154-required, then pcontrol is forced to use the named host, even if the
     155machine is down, unknown, or otherwise unavailable. If the machine is
     156not available, pcontrol will simply hold onto the job until the
     157machine is available or the job is deleted. Note that PanTasks may
     158delete jobs from pcontrol if they remain pending for too long.
    250159
    251160It is possible to interact directly with the parallel processor to
     
    287196identified to the controller. If such a host is required, the
    288197controller will simply keep the associated jobs in the pending state
    289 until such a machine exists. See the pcontrol documentation for
     198until such a machine exists. See the pcontrol section below for
    290199further discussion of the controller manipuation of jobs and hosts.
    291200
     
    373282\item external communications
    374283\item job exit status
    375 \item job stdout parsing
     284\item job stdout/stderr parsing
    376285\end{itemize}
    377286
     
    399308value of the stdout lines from the UNIX command, and the value
    400309\code{$var:n} is set to the number of output lines.
     310% $
    401311
    402312Fine-grained control over the job exit status is available with the
     
    411321status.
    412322
    413 Jobs may transmit their results back to PanTasks for further evaluation
    414 through the standard output and standard error streams. Whenever a job
    415 exits, the complete stdout and stderr streams from the job are pushed
    416 onto the PanTasks queues stdout and stderr. The job exit macros may then
    417 parse these queues, moving the results into other PanTasks / Opihi data
    418 containers (queues, variables, vectors, whatever is appropriate). Note
    419 that currently, the output data is simply pushed onto these output
    420 queues. It is currently the responsibility of the PanTasks programmer to
    421 use or dispose of the data in these queues. This may change in the
    422 future: the queues may be flushed for each job completion.
     323Jobs may transmit their results back to PanTasks for further
     324evaluation through the standard output and standard error
     325streams. Whenever a job exits, the complete stdout and stderr streams
     326from the job are pushed onto the PanTasks queues \code{stdout} and
     327\code{stderr}. The job exit macros may then parse these queues, moving
     328the results into other PanTasks / Opihi data containers (queues,
     329variables, vectors, whatever is appropriate). Note that currently, the
     330output data is simply pushed onto these output queues. It is currently
     331the responsibility of the PanTasks programmer to use or dispose of the
     332data in these queues. This may change in the future: the queues may be
     333flushed for each job completion.
     334
     335\subsection{PanTasks Monitoring Loop}
     336
     337\begin{figure}
     338\begin{center}
     339\includegraphics[scale=0.85,angle=-90]{pics/pantasks.01.ps}
     340\caption{\label{MonitorLoop} PanTasks Monitor Loop}
     341\end{center}
     342\end{figure}
     343
     344Figure~\ref{MonitorLoop} illustrates the operation of PanTasks.
     345Currently, PanTasks is run as a stand-alone foreground process, not a
     346server.  In this current operating mode, PanTasks accepts commands
     347from the user (left side) via a GNU readline interface.  Readline
     348provides a mechanism to schedule an background process which is
     349executed on a regular basis, or in the interval after each keystroke.
     350This background processing is represented as the loop on the right.
     351In this loop, PanTasks checks on the status of pcontrol and on any
     352locally spawned background jobs.  It also checks the list of tasks for
     353tasks which are ready to be executed.  The tasks and the background
     354jobs are kept in rotating queues.  Every time the loop is processed,
     355PanTasks runs through a number of the background jobs and tasks,
     356attempting to evaluate as many as possible, but stopping after a
     357limited number of milliseconds.  This test stage cycles through the
     358tasks and/or jobs in their queue, but stops if it examines all of the
     359entries in the queue.  If this testing process runs out of time before
     360the entire queue is searched, it leaves the sequence intact for the
     361next pass.  The timeout is set to keep the keyboard small enough to
     362keep the human interaction from being troublesome.
     363
     364\begin{figure}
     365\begin{center}
     366\includegraphics[scale=0.85,angle=-90]{pics/pantasks.02.ps}
     367\caption{\label{TaskLoop} PanTasks Task Check Loop}
     368\end{center}
     369\end{figure}
     370
     371Figure~\ref{TaskLoop} shows the interactions performed for each check
     372of the list of tasks.  The task timers are examined to see if the
     373specific task is ready to be executed.  If so, then the task exec
     374macro is executed.  If this macro exit status is false, the loop goes
     375to the next task.  If the task exec macro is true, the job command is
     376constructed and the job is submitted to the correct location, either
     377the controller (pcontrol) or to the queue of local, background jobs.
     378
     379\begin{figure}
     380\begin{center}
     381\includegraphics[scale=0.85,angle=-90]{pics/pantasks.03.ps}
     382\caption{\label{JobLoop} PanTasks Job Check Loop}
     383\end{center}
     384\end{figure}
     385
     386Figure~\ref{JobLoop} shows the interactions performed for each check
     387of a single background job.  The job timer is checked to see if the
     388job has timed out.  Next, the job run status is examined to see if the
     389job has finished or not.  If the job has finished, the appropriate
     390exit macro is executed and the job results are returned to the rest of
     391the PanTasks data structures (ie, stderr and stdout queues are filled
     392out).  Users should not define exit macros which perform long running
     393jobs, or PanTasks will become quite sluggish to keyboard strokes.
     394
     395PanTasks also checks the current status of pcontrol on each loop.
     396In this test, PanTasks requests from pcontrol a list of the jobs which
     397have finished.  It then attempts to harvest the finished jobs one by
     398one and place the results in the approrpiate locations.  This loop is
     399also limited to a fixed amount of time; any pcontrol jobs which remain
     400unharvested are left for the next pass by PanTasks.
    423401
    424402\subsection{Running the scheduler}
     
    458436\end{verbatim}
    459437
    460 \begin{figure}
    461 \begin{center}
    462 \includegraphics[scale=0.85]{pics/pantasks.01.ps}
    463 \caption{\label{queues} PanTasks queues and MDDB tables}
    464 \end{center}
    465 \end{figure}
    466 
    467 \begin{figure}
    468 \begin{center}
    469 \includegraphics[scale=0.85]{pics/pantasks.02.ps}
    470 \caption{\label{queues} PanTasks queues and MDDB tables}
    471 \end{center}
    472 \end{figure}
    473 
    474 \begin{figure}
    475 \begin{center}
    476 \includegraphics[scale=0.85]{pics/pantasks.03.ps}
    477 \caption{\label{queues} PanTasks queues and MDDB tables}
    478 \end{center}
    479 \end{figure}
    480 
    481438\newpage
    482439\section{pcontrol : the PanTasks parallel controller}
     
    494451\subsection{Host States}
    495452
     453\begin{figure}
     454\begin{center}
     455\includegraphics[scale=0.85,angle=-90]{pics/pantasks.04.ps}
     456\caption{\label{HostStates} PanTasks Host States}
     457\end{center}
     458\end{figure}
     459
    496460pcontrol maintains a table of available processing computers (hosts)
    497461and tracks their status. Hosts managed by pcontrol are allowed to be
    498 in one of several states: off, down, idle, busy, and done. These
    499 states have the following meanings:
    500 
    501 If the host is off, it is known to pcontrol, but pcontrol does not
    502 have an active connection to the machine. Hosts which are off are not
    503 available for jobs, and pcontrol does not attempt to initiate a
    504 connection to them.
     462in one of several states: \code{off}, \code{down}, \code{idle},
     463\code{busy}, and \code{done} (see Figure~\ref{HostStates}). There are
     464also two virtual states: \code{new} and \code{delete}.  These states
     465have the following meanings:
     466
     467If the host is \code{off}, it is known to pcontrol, but pcontrol does
     468not have an active connection to the machine. Hosts which are
     469\code{off} are not available for jobs, and pcontrol does not attempt to
     470initiate a connection to them.  A pcontrol user may force a host to
     471transition to the \code{off} state with the command host
     472\code{off~(hostname)}. (Note that this command will set only one of
     473the connections to the named host to \code{off}. If multiple
     474connections to a machine have been defined, multiple \code{off}
     475commands must be sent).
    505476
    506477When pcontrol is told to consider a machine on, the machine is moved
    507 from the off state to the down state. Pcontrol attempts to initiate a
    508 connection to the host. Connections are made by running a remote
    509 client on the host, using the specified connection method. The
    510 connection method may be ssh, rsh, or an equivalent remote shell
    511 connection. The choice is specified by the COMMAND Opihi variable. The
    512 remote connection starts a dedicated remote client which must accept
    513 the pcontrol client commands and respond appropriately. The provided
    514 remote client is called pclient, though in principal other equivalent
    515 programs could be used by setting the Opihi variable SHELL (this
    516 feature more generally allows a user to specify a path to the remote
    517 client, if it is not in the user's path). A pcontrol user may force a
    518 host to transition to the off state with the command host off
    519 (hostname). ( Note that this command will set only one of the
    520 connections to the named host to off. If multiple connections to a
    521 machine have been defined, multiple off commands must be sent).
     478from the \code{off} state to the \code{down} state. Pcontrol attempts
     479to initiate a connection to the host. Connections are made by running
     480a remote client on the host, using the specified connection
     481method. The connection method may be ssh, rsh, or an equivalent remote
     482shell connection. The choice is specified by the \code{COMMAND} Opihi
     483variable. The remote connection starts a dedicated remote client which
     484must accept the pcontrol client commands and respond
     485appropriately. The provided remote client is called {\em pclient},
     486though in principal other equivalent programs could be used by setting
     487the Opihi variable \code{SHELL}.  This feature more generally allows a
     488user to specify a path to the remote client, if it is not in the
     489user's path.
    522490
    523491If the remote connection is successful, the connected host is moved by
    524 pcontrol from the down state to the idle state. If the connection is
    525 unsuccessful, pcontrol will try again after a certain period of
    526 time. If the connection continues to be unsuccessful, the retry period
    527 is doubled for each successiver connection attempt. If the user wants
    528 to force pcontrol to retry the connection to a machine (if, for
    529 example, the timeout is now very long, but the user knows the
     492pcontrol from the \code{down} state to the \code{idle} state. If the
     493connection is unsuccessful, pcontrol will try again after a certain
     494period of time. If the connection continues to be unsuccessful, the
     495retry period is doubled for each successiver connection attempt. If
     496the user wants to force pcontrol to retry the connection to a machine
     497(if, for example, the timeout is now very long, but the user knows the
    530498machine's ethernet cable has been re-inserted...), this can be
    531 achieved with the command host retry (hostname). A host which is down
    532 is in the limbo state between off and idle.
     499achieved with the command host \code{retry (hostname)}. A host which
     500is \code{down} is in the limbo state between \code{off} and
     501\code{idle}.
    533502
    534503Once pcontrol has made a successful connection to the host, the host
    535 is in the idle state. At this point, it is ready to accept jobs from
    536 pcontrol for execution. Pcontrol repeatedly queries the hosts to check
    537 that they are still alive. If a host is discovered to be unresponsive,
    538 and particularly if the remote pipe connection has closed, then the
    539 machine is moved back to the down state.
    540 
    541 Hosts which are idle may accept a job from pcontrol. A job simply
    542 consists of a bare UNIX command, without redirection of standard input
    543 or standard output. The host will initiate the job, and pcontrol will
    544 place the host into the busy state. The remote client, pclient, runs
    545 the job in the background and will continue to accept input from
    546 pcontrol. pcontrol will continue to check the status of the host, and
    547 now also the status of the specific job. As before, if the connection
    548 breaks, pcontrol will migrate the host to the down state. Any job
    549 already initiated on a host which goes down will be returned for later
    550 processing, so the job will not be lost.
     504is in the \code{idle} state. At this point, it is ready to accept jobs
     505from pcontrol for execution. Pcontrol periodically queries the hosts
     506to check that they are still alive. If a host is discovered to be
     507unresponsive, and particularly if the remote pipe connection has
     508closed, then the machine is moved back to the \code{down} state.
     509
     510Hosts which are \code{idle} may accept a job from pcontrol. A job
     511simply consists of a bare UNIX command, without redirection of
     512standard input or standard output. The host will initiate the job, and
     513pcontrol will place the host into the \code{busy} state. The remote
     514client, pclient, runs the job in the background and will continue to
     515accept input from pcontrol. pcontrol will continue to check the status
     516of the host, and now also the status of the specific job. As before,
     517if the connection breaks, pcontrol will migrate the host to the
     518\code{down} state. Any job already initiated on a host which goes down
     519will be returned to the pool of unexecuted jobs for later processing,
     520so the job will not be lost.
    551521
    552522When the job exits, pclient tells pcontrol that the job is completed,
    553523and specifies the exit status. At this point, pcontrol will move the
    554 host from busy to done state. It will stay in this state until
    555 pcontrol can determine the ending conditions and reset the remote
    556 client. pcontrol requests the standard error and standard output from
    557 the job from pclient. pcontrol stores this data with its information
    558 about the completed job, and send a reset command to the remote
    559 client. Once these cleanup tasks are successfully completed, pcontrol
    560 will move the host to the idle state, ready for further jobs.
     524host from \code{busy} to \code{done} state. It will stay in this state
     525until pcontrol can determine the ending conditions and reset the
     526remote client. pcontrol requests the standard error and standard
     527output from the job from pclient. pcontrol stores this data with its
     528information about the completed job, and send a reset command to the
     529remote client. Once these cleanup tasks are successfully completed,
     530pcontrol will move the host to the \code{idle} state, ready for
     531further jobs.
    561532
    562533Each physical computer may have multiple processors. pcontrol treats
     
    574545\subsection{Jobs}
    575546
    576 The pcontrol accepts new jobs with the command job ..., in which the
    577 ellipsis represents the command and arguments of a valid UNIX
    578 command. The commands are run under sh, and are executed in the user's
    579 home directory. (If it is desired, we can easily add a command to tell
    580 pclient to perform cd). Users should be wary of the conditions under
    581 which the remote jobs are run. If the nodes in question all
     547The pcontrol accepts new jobs with the command \code{job ...}, in
     548which the ellipsis represents the command and arguments of a valid
     549UNIX command. The commands are run under \code{sh}, and are executed
     550in the user's home directory. Users should be wary of the conditions
     551under which the remote jobs are run. If the nodes in question all
    582552cross-mount the same home directories, multiple jobs which interact
    583553with the same named file may produce unexpected results. The
     
    590560not realize that specific jobs do not behave the same on all machines,
    591561or if a necessary resource (eg, some input data file) is only
    592 available or accessible from some of the hosts. It is the
     562available or accessible from some of the hosts. It is also the
    593563responsibility of the task to wait for network lags (ie, NFS delays).
    594564
     
    597567pcontrol, the command echoes back the Job ID. This ID may be used by
    598568other pcontrol commands to obtain information about or interact with
    599 the job.
     569the job.  For example, PanTasks uses the Job ID to examine specific
     570jobs.
    600571
    601572A job may specify a specific host for the task execution. The host
     
    634605(JobID).
    635606
    636 Jobs are moved between the following states by pcontrol:
    637 
     607\begin{figure}
     608\begin{center}
     609\includegraphics[scale=0.85,angle=-90]{pics/pantasks.05.ps}
     610\caption{\label{queues} pcontrol job states.  Transitions labeled Ux
     611  are issued by the pcontrol user (including PanTasks).  Transitions
     612  labeled Px are initiated by pcontrol.  Transitions labeled Tx are
     613  the result of the job completion}
     614\end{center}
     615\end{figure}
     616
     617Jobs are moved between the following states by pcontrol (see
     618Figure~\ref{JobStates}):
    638619\begin{itemize}
    639620\item pending: the job has not yet been executed.
     
    647628
    648629It is possible to check the status of a single host or job with the
    649 user command check.
     630user command \code{check}.
    650631
    651632pcontrol continuously examines the stack of jobs, adjusting their
     
    658639number of microseconds for the timeout.
    659640
    660 the pcontrol system status may be examined with the command
     641The pcontrol system status may be examined with the command
    661642status. This provides a dump of the job stacks and the host stacks.
    662643
     
    668649have exited or crashed.
    669650
    670 A specific job may be killed with the command kill (JobID). This
    671 command is only valid for a job in the busy state. Any job in the
    672 pending, exit, or crash state may be deleted with the delete (JobID)
    673 command. This is necessary to free the memory associated with the job
    674 and its output streams.
    675 
    676 The command verbose (mode) turns the verbosity of the pcontrol
     651A specific job may be killed with the command \code{kill
     652(JobID)}. This command is only valid for a job in the busy state. Any
     653job in the pending, exit, or crash state may be deleted with the
     654\code{delete (JobID)} command. This is necessary to free the memory
     655associated with the job and its output streams.  PanTasks
     656automatically performs these job harvesting functions.
     657
     658The command \code{verbose (mode)} turns the verbosity of the pcontrol
    677659operations on or off.
    678660
    679 The pcontrol and the IPP Image Server have related needs for
    680 information from the combined storage-and-processing nodes regarding
    681 which nodes are available. It is not yet clear if this information is
    682 best stored in a single location (either pcontrol or IPP Image
    683 Server), which provides the information to other systems on demand, or
    684 if both systems should maintain the information. Also, it may be
    685 necessary to distinguish nodes which are available for processing from
    686 those that are available to serve data as part of the IPP Image
    687 Server.
    688 
    689 \subsection{Command Summary}
     661The pcontrol and Nebulous have related needs for information from the
     662combined storage-and-processing nodes regarding which nodes are
     663available. Currently, the two systems independently examine the
     664hardware to judge the availability.  It is not yet clear if this
     665information is best stored in a single location (either pcontrol or
     666Nebulous), which provides the information to other systems on demand.
     667The current implementation allows the IPP system as a whole to
     668distinguih nodes which are available for processing from those that
     669are available to serve data as part of Nebulous.
     670
     671\begin{figure}
     672\begin{center}
     673\includegraphics[scale=0.85,angle=-90]{pics/pantasks.06.ps}
     674\caption{\label{PControlLoop} PControl Job Monitor Loop}
     675\end{center}
     676\end{figure}
     677
     678Figure~\ref{PControlLoop} illustrated the pcontrol job monitor loop.
     679This is very similar to the loop in PanTasks.  A background process
     680launched by readline during idle periods cycles through the list of
     681hosts (children) and migrates jobs to and from them as needed.
     682
     683\subsection{pcontrol Command Summary}
    690684
    691685\begin{verbatim}
     
    703697\end{verbatim}
    704698
    705 \begin{figure}
    706 \begin{center}
    707 \includegraphics[scale=0.85]{pics/pantasks.04.ps}
    708 \caption{\label{queues} PanTasks queues and MDDB tables}
    709 \end{center}
    710 \end{figure}
    711 
    712 \begin{figure}
    713 \begin{center}
    714 \includegraphics[scale=0.85]{pics/pantasks.05.ps}
    715 \caption{\label{queues} PanTasks queues and MDDB tables}
    716 \end{center}
    717 \end{figure}
    718 
    719 \begin{figure}
    720 \begin{center}
    721 \includegraphics[scale=0.85]{pics/pantasks.06.ps}
    722 \caption{\label{queues} PanTasks queues and MDDB tables}
    723 \end{center}
    724 \end{figure}
    725 
    726699\newpage
    727700\section{pclient}
     
    739712recommended practice is to set up ssh to allow the connection to the
    740713remote host without additional authentication using the appropriate
    741 authorized keys (see this article on ssh issues).
     714authorized keys.  The security is maintained by the security of ssh
     715logins to the computers used by PanTask and pcontrol. 
    742716
    743717It is convenient to keep a continuous connection to the remote
     
    768742\begin{figure}
    769743\begin{center}
    770 \includegraphics[scale=0.85]{pics/pantasks.07.ps}
     744\includegraphics[scale=0.85,angle=-90]{pics/pantasks.07.ps}
    771745\caption{\label{queues} PanTasks queues and MDDB tables}
    772746\end{center}
Note: See TracChangeset for help on using the changeset viewer.