Skip to content

Time constraint#22

Merged
maxitg merged 11 commits intomasterfrom
feature/timeConstraint
Mar 1, 2021
Merged

Time constraint#22
maxitg merged 11 commits intomasterfrom
feature/timeConstraint

Conversation

@maxitg
Copy link
Copy Markdown
Owner

@maxitg maxitg commented Mar 1, 2021

Changes

  • PostTagSearcher now correctly uses the time constraint parameter.
  • ConclusionReason will either be TimeConstraintExceeded or NotEvaluated based on whether the time constraint was reached before or during the evaluation of a particular init.

Comments

  • Checkpoints Searcher checkpoints #21 should be merged first.
  • The time constraint will be exceeded slightly because results need to be collected.

Examples

  • The first result of the following concludes with reason TimeConstraintExceeded:
PostTagSearcher::EvaluationParameters parameters;
parameters.groupTimeConstraintNs = 100000000;  // 0.1 seconds
const auto result = PostTagSearcher().evaluateRange(
    64, 1473593303835332608, 1473593303835332609, parameters);
  • The other two results are NotEvaluated for now, but that can change after parallelization is implemented.

This change is Reviewable

@maxitg maxitg added the enhancement New feature or request label Mar 1, 2021
@okofish
Copy link
Copy Markdown
Collaborator

okofish commented Mar 1, 2021

Would you be able to add an option (e.g. an EvaluationParameters member) that causes NotEvaluated results to be omitted entirely from the output? Since the EvaluationResult includes the initial state and I subsequently include that state in each result file entry, for the purpose of generating a result file there's no utility in including NotEvaluated results.

@maxitg
Copy link
Copy Markdown
Owner Author

maxitg commented Mar 1, 2021

@okofish, sure, I'll do that.

Base automatically changed from feature/searcherCheckpoints to master March 1, 2021 18:33
@maxitg maxitg force-pushed the feature/timeConstraint branch from 1b8463c to 9cd6981 Compare March 1, 2021 18:36
@maxitg maxitg marked this pull request as ready for review March 1, 2021 18:45
@maxitg
Copy link
Copy Markdown
Owner Author

maxitg commented Mar 1, 2021

@okofish, sure, I'll do that.

Done.

// TimeConstraintExceeded conclusion reason. The aborted evaluations will have EvaluationResult filled in with
// values obtained so far. The remaining ones will be filled with zeros.
uint64_t groupTimeConstraintNs = std::numeric_limits<uint64_t>::max();
int64_t groupTimeConstraintNs = std::numeric_limits<int64_t>::max();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no, now we can only run for 292 years instead of 584!

@maxitg maxitg merged commit 77405cc into master Mar 1, 2021
@maxitg maxitg deleted the feature/timeConstraint branch March 1, 2021 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants