boinc/doc/work.html

75 lines
2.6 KiB
HTML
Raw Normal View History

<title>Workunits</title>
<body bgcolor=ffffff>
<h2>Workunits</h2>
<p>
A <b>workunit</b> describes a computation to be performed.
Workunits are maintained in the <b>workunit</b> table in the BOINC DB.
The attributes of a workunit include:
</p>
<ul>
<li> Its name (unique across all workunits in the project).
<li> Its application.
<li> An XML document describing its input files and other parameters
(see below).
<li> The estimated resource requirements of the work unit
(computation, memory, disk space).
<li> The maximum processing
(measured in <a href=credit.html>Cobblestones</a>)
and maximum disk space to be used for the computation.
An instance of the computation that exceeds either of these bounds
will be aborted.
This mechanism is used to prevent an infinite-loop bug from
indefinitely incapacitating a host.
<li> A <b>delay bound</b>: upper bound on how long (in real time)
a result associated with this work unit should take to complete.
This determines which hosts the workunit can be sent to,
and it's used to assign result deadlines and
times for retrying results.
</ul>
<p>
Some parameters of a workunit are described by an XML document of the form
<pre>
[ &lt;file_info>...&lt;/file_info> ]
[ ... ]
&lt;workunit>
[ &lt;command_line>-flags xyz&lt;/command_line> ]
[ &lt;env_vars>name=val&amp;name=val&lt;/env_vars> ]
[ &lt;max_processing>...&lt;/max_processing> ]
[ &lt;max_disk>...&lt;/max_disk> ]
[ &lt;file_ref>...&lt;/file_ref> ]
[ ... ]
&lt;/workunit>
</pre>
The components are:
<table border=1 cellpadding=6>
<tr><td>&lt;command_line></td>
<td>The command-line arguments to be passed to the main program.
</td></tr>
<tr><td>&lt;env_vars></td>
<td>A list of environment variables in the form
name=value&name=value&name=value.
</td></tr>
<tr><td>&lt;max_processing></td>
<td>Maximum processing (in Cobblestones).
The default is determined by the client; typically it is 1.
</td></tr>
<tr><td>&lt;max_disk></td>
<td>Maximum disk usage (in bytes).
The default is determined by the client; typically it is 1,000,000.
</td></tr>
<tr><td>&lt;file_ref></td>
<td> describes a <a
href="files.html">reference</a> to an input file, each of which is
described by a <b>&lt;file_info></b> element.
</td></tr></table>
<p>
A workunit is associated with an application, not with a particular
version or range of versions.
If the format of your input data changes in
a way that is incompatible with older versions,
you must create a new application.
This can often be avoided by using XML data format.
<p>
The <a href="tools_work.html">create_work</a> utility program provides a
simplified interface for creating workunits.