Changes between Version 9 and Version 10 of ValidationSimple


Ignore:
Timestamp:
Aug 21, 2008, 1:56:18 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ValidationSimple

    v9 v10  
    2424extern double compute_granted_credit(WORKUNIT&, vector<RESULT>& results);
    2525}}}
    26 Given a set of results (at least one of which is valid) compute the credit to be granted to all of them. Normally this function simply returns median_mean_credit(wu, results). If [WorkGeneration credit is specified in the workunit], call get_credit_from_wu(wu, results).
     26Given a set of results (at least one of which is valid) compute the credit to be granted to all of them.
     27Normally this function simply returns median_mean_credit(wu, results).
     28If [WorkGeneration credit is specified in the workunit],
     29call get_credit_from_wu(wu, results).
    2730
    28 You must link these functions with the files validator.C, validate_util.C, and validate_util2.C. The result is your custom validator.
     31You must link these functions with the files validator.C, validate_util.C, and validate_util2.C.
     32The result is your custom validator.
     33
     34If for some reason you need to access the WORKUNIT in your init_result() etc. functions,
     35it's pointed to by the global variable '''g_wup'''.
     36
    2937== Example ==
    30 Here's an example in which the output file contains an integer and a double. Two results are considered equivalent if the integer is equal and the doubles differ by no more than 0.01.
     38
     39Here's an example in which the output file contains an integer and a double.
     40Two results are considered equivalent if the integer is equal and the doubles differ by no more than 0.01.
    3141
    3242This example uses [BackendUtilities utility functions] get_output_file_path() and try_fopen().
     
    102112Useful for 2 valid results.
    103113
    104 It will average them if the claimed credits are close together. If they aren't, then it will compare each claimed credit against that computers historical granted credit per CPU sec to see which one is claiming closer to their historical average. It will grant credit to both computers with the claimed credit that is closer to the historical value.
    105 This helps grant the most appropriate credit for situations where there is a computer that always claims too low or a computer that always claims too high.
     114It will average them if the claimed credits are close together.
     115If they aren't, then it will compare each claimed credit against that computer's
     116historical granted credit per CPU sec to see which one is claiming closer to their historical average.
     117It will grant credit to both computers with the claimed credit that is closer to the historical value.
     118This helps grant the most appropriate credit for situations where there is a computer
     119that always claims too low or a computer that always claims too high.