Workunits
A workunit describes a computation to be performed.
Workunits are maintained in the workunit table in the BOINC DB.
The attributes of a workunit include:
- Its application.
- Its name (unique across all workunits in the project).
- An XML document describing its input files and other parameters
(see below).
- The estimated resource requirements of the work unit
(computation, memory, disk space, network traffic).
- Counts of how many times this workunit should be dispatched, how
many times it has been dispatched, how many results have been returned,
and how many failures have occurred.
The inputs to a workunit are described by an XML document of the form
[ <file_info>...</file_info> ]
[ ... ]
<workunit>
<name>foobar</name>
<app_name>blah</app_name>
[ <version_num>1</version_num> ]
[ <command_line>-flags xyz</command_line> ]
[ <env_vars>name=val&name=val</env_vars> ]
[ <file_ref>...</file_ref> ]
[ ... ]
<workunit>
The components are:
- The <name> element is the name of the workunit.
- The <app_name> element is the name of the
application.
- The <version_num> element is ???.
- The <command_line> element, if present, is the
command-line arguments to be passed to the main program.
- The <env_vars> element, if present, is a list of
environment variables to be passed to the main program.
- Each <file_ref> element describes a reference to an input file, each of which is
described by a <file_info> element.
A workunit is associated with an application, not with a particular
version or set 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.
The create_work utility program provides a
simplified interface for creating workunits.