Changes between Version 1 and Version 2 of WorkGeneration


Ignore:
Timestamp:
Apr 18, 2007, 2:06:03 PM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkGeneration

    v1 v2  
     1= Generating work =
     2
    13As described earlier, a workunit represents the inputs to a computation. The steps in creating a workunit are:
    24
     
    79Once this is done, BOINC takes over: it creates one or more results for the workunit, distributes them to client hosts, collects the output files, finds a canonical result, assimilates the canonical result, and deletes files.
    810
    9 During the testing phase of a project, you can use the make_work daemon to replicate a given workunit as needed to maintain a constant supply of work. This is useful while testing and debugging the application.
    10 Workunit and result template files
     11During the testing phase of a project, you can use the [http://boinc.berkeley.edu/busy_work.php make_work daemon] to replicate a given workunit as needed to maintain a constant supply of work. This is useful while testing and debugging the application.
     12
     13== Workunit and result template files ==
    1114
    1215A workunit template file has the form
     
    4144 <file_info>, <file_ref>::
    4245
    43         Each pair describes an input file and the way it's referenced.
     46        Each pair describes an [http://boinc.berkeley.edu/files.php#file input file] and [http://boinc.berkeley.edu/files.php#file_ref the way it's referenced].
    4447
    4548 <command_line>::
     
    4952 <credit>::
    5053
    51         The amount of credit to be granted for successful completion of this workunit. Use this only if you know in advance how many FLOPs it will take. Your validator must use get_credit_from_wu() as its compute_granted_credit() function.
    52 Other elements  Work unit attributes
     54        The amount of credit to be granted for successful completion of this workunit. Use this only if you know in advance how many FLOPs it will take. Your [http://boinc.berkeley.edu/validate_simple.php validator] must use get_credit_from_wu() as its compute_granted_credit() function.
     55
     56Other elements::
     57        Work unit attributes
    5358
    5459Workunit database records include a field, 'xml_doc', that is an XML-format description of the workunit's input files. This is derived from the workunit template as follows:
     
    7883    * <UPLOAD_URL/> is replaced with the upload URL.
    7984
    80 Moving input files to the download directory
    81 If you're using a flat download directory, just put input files in that directory. If you're using hierarchical upload/download directories, you must put each input file in the appropriate directory; the directory is determined by the file's name. To find this directory, call the C++ function
     85== Moving input files to the download directory ==
     86If you're using a flat download directory, just put input files in that directory. If you're using [http://boinc.berkeley.edu/hier_dir.php hierarchical upload/download directories], you must put each input file in the appropriate directory; the directory is determined by the file's name. To find this directory, call the C++ function
    8287{{{
    8388dir_hier_path(
     
    98103}}}
    99104copies an input file from the test_workunits directory to the download directory hierarchy.
    100 Creating workunit records
     105
     106== Creating workunit records ==
    101107
    102108Workunits can be created using either a script (using the create_work program) or a program (using the create_work() function). The input files must already be in the download hierarchy.
     
    133139    infile_1 ... infile_m           // input files
    134140}}}
    135 The program must be run in the project root directory. The workunit parameters are documented here. The -additional_xml argument can be used to supply, for example, <credit>12.4</credit>.
     141The program must be run in the project root directory. The workunit parameters are documented [http://boinc.berkeley.edu/work.php here]. The -additional_xml argument can be used to supply, for example, <credit>12.4</credit>.
    136142
    137143BOINC's library (backend_lib.C,h) provides the functions:
     
    150156}}}
    151157create_work() creates a workunit. The arguments are similar to those of the utility program; some of the information is passed in the DB_WORKUNIT structure, namely the following fields:
    152 
     158{{{
    153159name
    154160appid
    155 
     161}}}
    156162The following may be passed either in the DB_WORKUNIT structure or in the workunit template file:
    157 
     163{{{
    158164rsc_fpops_est
    159165rsc_fpops_bound
     
    167173max_total_results
    168174max_success_results
    169 
    170 Examples
    171 Making one workunit
     175}}}
     176
     177== Examples ==
     178=== Making one workunit ===
    172179
    173180Here's a program that generates one workunit (error-checking is omitted for clarity):
     
    212219}}}
    213220This program must be run in the project directory since it expects to find the config.xml file in the current directory.
    214 Making lots of workunits
     221=== Making lots of workunits ===
    215222
    216223If you're making lots of workunits (e.g. to do the various parts of a parallel computation) you'll want the workunits to differ either in their input files, their command-line arguments, or both.