Validation is the process of comparing redundant results and deciding which is to be considered correct. Because floating-point arithmetic varies between platforms, this decision is an application-specific.

A validator is a back-end program that does validation and credit-granting. You must supply a validator for each application in your project. BOINC supplies a framework program validator.C. This program must be linked with two application-specific functions:

",
htmlspecialchars("
int check_set(vector results, DB_WORKUNIT& wu, int& canonicalid, double& credit, bool& retry);
"),
"

",
htmlspecialchars("
int check_pair(RESULT& new_result, RESULT& canonical_result, bool& retry);
"),
"

Two example validators are supplied (each implements check_set() and check_pair()):

validate_util.C contains support functions for both of the above.


NOTE: the above code assumes that each result has a single output file. Revisions will be needed to handle multiple output files. To do this you will need to know the following:

The database field 'result.xml_doc_out' describes a result's output files. It has the form

",htmlspecialchars("
...
[ ... ]

    foobar
    blah
    blah
    ...
    [ ... ]

"),"
The components are:

The XML document describing the sizes and checksums of the output files is a list of <file_info> elements, with the nbytes and md5_cksum fields present. The project back end must parse this field to find the locations and checksums of output files. "; page_tail(); ?>