Skip to content

Parallel redesign - #3192

Open
Opt-Mucca wants to merge 5 commits into
latestfrom
parallel-redesign
Open

Parallel redesign#3192
Opt-Mucca wants to merge 5 commits into
latestfrom
parallel-redesign

Conversation

@Opt-Mucca

@Opt-Mucca Opt-Mucca commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

This PR is a first redesign of the parallel MIP code. I'm just going to dot point the major changes:

  • Adds nodes to the preparedNodes of each worker. A worker now only processes nodes assigned to it.
  • Adds a max node processing limit of 100 to each worker. This tries to balance thread utilisation.
  • Change backtrackPlunge to a simple DFS style algorithm without the ability to skip a level of the tree while backtracking based on pseudocosts.
  • Change the nodequeue attached to each worker to a simple std::vector.

For my tests on 8 threads this gives a 6.5% time improvement and 6% LP iteration improvement. It gives a 1% performance degradation on single-threaded performance. Edit: This change should also use 40% less memory.

Reason for single-threaded degradation: There is one outlier instance tbfp-network where the sub-mip no longer finds the optimal solution instantly. This means the problems solves 5x slower. It stems from the backtrackPlunge changes, but I'd mostly chalk it up to randomness. Without this instance the change is performance neutral on single-threaded and more than 6.5% improving on 8 threads.

@Opt-Mucca
Opt-Mucca requested a review from fwesselm August 3, 2026 09:52
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.76087% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.12%. Comparing base (2ed99be) to head (ef56dde).
⚠️ Report is 277 commits behind head on latest.

Files with missing lines Patch % Lines
highs/mip/HighsMipSolver.cpp 92.12% 13 Missing ⚠️
highs/mip/HighsSearch.cpp 76.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3192      +/-   ##
==========================================
+ Coverage   73.06%   73.12%   +0.06%     
==========================================
  Files         445      445              
  Lines      107661   107801     +140     
  Branches    17257    17262       +5     
==========================================
+ Hits        78659    78826     +167     
+ Misses      28726    28699      -27     
  Partials      276      276              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fwesselm fwesselm left a comment

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.

@Opt-Mucca, this looks great! Just a couple of uninformed comments from me.

Comment thread highs/mip/HighsMipSolver.cpp Outdated
worker.search_ptr_->getLocalNodes())) {
break;
if (!skip_separation) {
evaluateNode(i);

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.

The return value of evaluateNode is ignored here? It could return true, right? Does this overcount the total_nodes_explored?

@Opt-Mucca Opt-Mucca Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think this overcounts total_nodes_explored. The node should be processed by pruneNode and then increment the counter. Edit: The node is already sent of to processedNodes, but pruneNode should recognise this.

The bool return seems to be something left-over from early drafts (isn't even used on master currently)

Comment thread highs/mip/HighsMipSolver.cpp
Comment thread highs/mip/HighsMipSolver.cpp
Comment thread highs/mip/HighsMipSolver.cpp Outdated
Comment thread highs/mip/HighsMipSolver.cpp Outdated
Comment thread highs/mip/HighsMipSolver.cpp
Comment thread highs/mip/HighsSearch.cpp Outdated
Comment thread highs/mip/HighsSearch.cpp Outdated
Comment thread highs/mip/HighsSearch.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants