Parallel early termination - #3124
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## latest #3124 +/- ##
=======================================
Coverage 73.15% 73.16%
=======================================
Files 430 430
Lines 103937 104012 +75
Branches 16717 16726 +9
=======================================
+ Hits 76039 76101 +62
- Misses 27622 27635 +13
Partials 276 276 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fwesselm
left a comment
There was a problem hiding this comment.
Looks good, @Opt-Mucca. Just some minor comments/questions from me.
|
@fwesselm ready for round 2 of review |
| for (const HighsInt i : search_indices) { | ||
| if (i == early_terminated_worker) continue; | ||
| HighsMipWorker& worker = mipdata_->workers[i]; | ||
| worker.nodequeue.clear(); |
There was a problem hiding this comment.
This looks familiar. If it is repeated somewhere, maybe it's worth adding a method to clear this.
There was a problem hiding this comment.
I'd avoid that for now. Similar code is sprinkled everywhere, but it's always calling different sync functions and is missing some components depending on when it's called. Any central function would have so many arguments that it'd be confusing currently.
Thanks, @Opt-Mucca. Just one more comment, and I think it's good to go. |
This PR adds a deterministic stopping criteria during parallel MIP, so that some workers may terminate early in the case where another worker has already proven global optimality / infeasibility.
This should only affect cases where (1) a worker finds a primal solution where the existing global dual bound is within tolerances (2) a worker concludes that the problem is infeasible. In my test set it saves 5% of time on 3% of instances, and has no overhead + no effect on the solution path of everything else. I don't see a reason not to add this.
The biggest "change" here would be adding a
std::atomictoHighsMipSolverData, and when checking limits doing astd::memory_order_relaxedload.Edit: The "improvement" on LP iterations and nodes is much higher and might make this PR look good, but it's simply cheating by discarding the information from all other workers (necessary for determinism)