Skip to content

Conversation

@nguidotti
Copy link
Contributor

@nguidotti nguidotti commented Feb 2, 2026

This PR unifies the threading model across the MIP solver, such that the code now uses the tasking model from OpenMP. The only exception is the Papilo presolver that uses Intel TBB.

More specifically, this PR

  • Solves the CPU oversubscription problem. The solver now respect the number of threads set to the user, with the exception of Papilo or threads created by the CUDA runtime.
  • Removes overheads from creating and destroying std::thread. This also
  • Migrates RINS from std::thread to omp task. Similar to previous logic, one instance of RINS can run at a time.
  • Migrates CPU FJ from std::thread to omp task. There are a few limitations
    • scratch_cpu_fj_on_lp_opt and scratch_cpu_fj are running for the entire program. This essentially allocate two dedicated threads to these functions, while other routines needs to share the remaining CPU resources. This may hurt the performance for low core count CPUs.
    • Since there is a small delay between the task creation and its start (since the threads may be busy), the GPU FJ may finish before the CPU FJ even start when racing.
  • Replaces locks in the pseudocost with atomics to reduce contention.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

nguidotti and others added 30 commits December 12, 2025 10:22
…iteration and node limit to the diving threads.
@nguidotti nguidotti self-assigned this Feb 2, 2026
@nguidotti nguidotti added non-breaking Introduces a non-breaking change do not merge Do not merge if this flag is set improvement Improves an existing functionality mip labels Feb 2, 2026
@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 2, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@nguidotti nguidotti changed the title [WIP] Unified threading model in MIP solver [WIP, POC] Unified threading model in MIP solver Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Do not merge if this flag is set improvement Improves an existing functionality mip non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants