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);
"),
"
-
check_pair() compares a new result to the canonical result.
In the absence of errors,
it sets the new result's validate_state to either VALID or INVALID.
-
If it has a nonrecoverable error reading an output file of either result,
or if the new result's output file is invalid,
it must set the new result's outcome (in memory, not database)
to VALIDATE_ERROR.
-
If it has a recoverable error while reading an output file of either result,
it returns retry=true,
which causes the validator to arrange for the WU to be examined
again in a few hours.
-
check_pair() should return nonzero if a major error occurs.
This tells the validator to write an error message and exit.
Neither function should delete files or access the BOINC database.
A more detailed description is here.
Two example validators are supplied
(each implements check_set() and check_pair()):
-
sample_bitwise_validator requires a strict majority,
and regards results as equivalent only if they agree byte for byte.
-
sample_trivial_validator
regards any two results as equivalent if their CPU time
exceeds a given minimum.
";
page_tail();
?>