Skip to content

Fix two bugs in parallel scheduler - #3087

Merged
galabovaa merged 6 commits into
latestfrom
parallel-fix
Jun 26, 2026
Merged

galabovaa merged 6 commits into
latestfrom
parallel-fix

Conversation

@filikat

@filikat filikat commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Multiple crashes with message terminating due to uncaught exception of type HighsTask::Interrupt have been noticed. This PR fixes two bugs in the parallel scheduler that were responsible for this behaviour.

In detail:

  • The function HighsSplitDeque::checkInterrupt now sets rootTask to be null before throwing an exception. This ensures that more exceptions cannot be thrown during the process of stack unwinding.
  • The destructor of TaskGroup now sets rootTask to be null before waiting for the cancelled tasks to finish. This guarantees that all tasks are completed when the object is destroyed. It then reinstates the previous rootTask and calls HighsSplitDeque::checkInterrupt, potentially throwing an exception.
  • The destructor of TaskGroup is now declared noexcept(false) to allow the behaviour of the previous point to work.

Additional changes:

  • A new unit test CancelNestedTasks that uses nested TaskGroup objects to spawn tasks and immediately cancel them has been added. This was failing with latest but it passes after the changes.
  • The object TaskGroupSpecial that was used inside of HiPO in order for the tests to pass has now been removed.

Closes #2574 (and #2690 and #2996)

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.12%. Comparing base (767079a) to head (061dd13).
⚠️ Report is 48 commits behind head on latest.

Files with missing lines Patch % Lines
highs/ipm/hipo/factorhighs/Factorise.cpp 0.00% 4 Missing ⚠️
highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3087      +/-   ##
==========================================
+ Coverage   73.08%   73.12%   +0.03%     
==========================================
  Files         426      431       +5     
  Lines      103375   103820     +445     
  Branches    16651    16713      +62     
==========================================
+ Hits        75553    75918     +365     
- Misses      27546    27626      +80     
  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.

@jajhall
jajhall requested a review from galabovaa June 24, 2026 19:47
@filikat
filikat marked this pull request as ready for review June 25, 2026 08:43

@galabovaa galabovaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great! Thank you @filikat!

@galabovaa
galabovaa merged commit 15ccb65 into latest Jun 26, 2026
774 checks passed
@filikat
filikat deleted the parallel-fix branch June 26, 2026 13:26
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
highs 1.15.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>The highlights of v1.15 are the first variant of the parallel MIP solver
and the addition of HiPO in Python.

## Code changes

Following [PR #2886](ERGO-Code/HiGHS#2886), our
prototype multithreaded MIP solver is available, refactoring
the worker/node-search logic of the branch-and-cut solver to run
across multiple threads. This is the first release of the parallel MIP
solver.

A fix to the parallel scheduler was merged in
[PR #3087](ERGO-Code/HiGHS#3087).

Following [PR #2994](ERGO-Code/HiGHS#2994),
HiPO can now be used to solve LPs and QPs from `highspy`, with
documentation added in
[PR #3024](ERGO-Code/HiGHS#3024) and
[PR #3060](ERGO-Code/HiGHS#3060). HiPO
performance was further improved by faster handling of free variables
([PR #3013](ERGO-Code/HiGHS#3013)) and faster
triangular solves
([PR #3014](ERGO-Code/HiGHS#3014)).

Prompted by [#2957](ERGO-Code/HiGHS#2957),
square Hessians that are only slightly asymmetric are now accepted by
`Highs::qFormatOk`, rather than being rejected outright
([PR #2965](ERGO-Code/HiGHS#2965),
[PR #2984](ERGO-Code/HiGHS#2984) and
[PR #3003](ERGO-Code/HiGHS#3003)). Identification
of non-convexity in the QP solvers was also improved, with extended
documentation added in
[PR #3056](ERGO-Code/HiGHS#3056), and a further
bug affecting some QPs was fixed in
[PR #3069](ERGO-Code/HiGHS#3069). QP hot start
was added in [PR #3089](ERGO-Code/HiGHS#3089).

Following [PR #2982](ERGO-Code/HiGHS#2982),
several bugs in the computation of an Irreducible Infeasible Subsystem
(IIS) via `Highs::getIis` were fixed.

Following [PR #3046](ERGO-Code/HiGHS#3046),
zero-cost singleton columns are no longer fixed to an infinite bound
during `HPresolve::dualFixing`, and the size of shifts applied during
reduced-cost fixing was reduced in
[PR #2986](ERGO-Code/HiGHS#2986). Strengthened
variable bounds found during presolve are now retained
([PR #3010](ERGO-Code/HiGHS#3010)), a bug in
the computation of the fractional value of a variable with finite
lower and upper bounds was fixed
([PR #3005](ERGO-Code/HiGHS#3005)), and the
handling of infeasibilities for semi-continuous and semi-integer
variables was corrected
([PR #3018](ERGO-Code/HiGHS#3018)).

Following [PR #3042](ERGO-Code/HiGHS#3042),
parallel simplex is no longer used when solving the LP relaxations
that arise within the MIP solver, since it isn't safe to do so when
the MIP solver is itself running in parallel.

Following [PR #2971](ERGO-Code/HiGHS#2971),
`highspy` now supports scalar division, and significant improvements
were made to `highspy`'s static typing in
[PR #2983](ERGO-Code/HiGHS#2983). Context
manager support was added to `highspy` in
[PR #3093](ERGO-Code/HiGHS#3093).

Following [PR #3039](ERGO-Code/HiGHS#3039),
`Highs::setBasis` and `Highs::setLogicalBasis` have been implemented,
and additional methods were added to the C# wrapper in
[PR #3041](ERGO-Code/HiGHS#3041).

Prompted by [#3044](ERGO-Code/HiGHS#3044),
a further bug was fixed in
[PR #3092](ERGO-Code/HiGHS#3092), and
[PR #3091](ERGO-Code/HiGHS#3091) corrects the
re-checking of an implied bound, fixing
[#3090](ERGO-Code/HiGHS#3090).

Following [PR #2981](ERGO-Code/HiGHS#2981),
C-heap memory leaks in solver state cleanup were fixed, and
[PR #3081](ERGO-Code/HiGHS#3081) fixes a bug
in column stuffing.

Following [PR #3016](ERGO-Code/HiGHS#3016),
`Highs::presolve()` now logs and returns failure appropriately when
called inconsistently with the state of the incumbent model.

Prompted by [#3007](ERGO-Code/HiGHS#3007), a
potential typo in `FactorHiGHSSolver::chooseNla()` was corrected, and
several other minor fixes were collected in
[PR #3017](ERGO-Code/HiGHS#3017) and
[PR #3004](ERGO-Code/HiGHS#3004) (the latter
for `HighsCliqueTable`).

Following [PR #3057](ERGO-Code/HiGHS#3057),
lines in HiGHS options files that contain only spaces are now ignored,
and the text of the first line containing an error is printed in the
resulting message.

## Build changes

The Python build has been updated and an additional python package is
available. The HiPO dependencies are linked via the optional
`highspy-extras`, e.g. Metis, for all platforms, and OpenBLAS, for
Windows and Linux. The `highspy-extras` package is automatically
consumed by `highspy` and does not need to be imported manually. Note,
that `highspy-extras` is distributed under the Apache 2.0 license, due
to the dependencies' licensing.

On Linux, `libblas` is no longer supported, in favour of OpenBLAS. MKL
support would be considered at a later stage.

Prompted by [#3000](ERGO-Code/HiGHS#3000),
[PR #3027](ERGO-Code/HiGHS#3027) fixes a
recent `alpine:edge` compilation issue.

Following [PR #3025](ERGO-Code/HiGHS#3025),
all remaining thread sanitizer data race warnings are cleared.

GPU support was added for local Python pip installs in
[PR #3071](ERGO-Code/HiGHS#3071) and the BLAS
library used by HiPO is now checked at runtime
([PR #3080](ERGO-Code/HiGHS#3080)).

The `cibuildwheel` workflow and `pyproject` configuration were updated
to `cibuildwheel` 4.0.0
([PR #3061](ERGO-Code/HiGHS#3061)), and the
NuGet publishing workflow now uses trusted publishing rather than an
API key
([PR #3062](ERGO-Code/HiGHS#3062),
following [PR #2959](ERGO-Code/HiGHS#2959)).

The macOS GitHub Actions build times were significantly improved in
[PR #3033](ERGO-Code/HiGHS#3033), and the C#
wrapper build was fixed to statically link the MSVC STL and correctly
install on win32
([PR #3070](ERGO-Code/HiGHS#3070)).

Following [PR #3001](ERGO-Code/HiGHS#3001),
the install location of the readme and license files was corrected,
and explicit `-fexceptions` copts were added to the Bazel config
([PR #3072](ERGO-Code/HiGHS#3072) and
[PR #3075](ERGO-Code/HiGHS#3075)).
</pre>
  <p>View the full release notes at <a href="https://github.com/ERGO-Code/HiGHS/releases/tag/v1.15.0">https://github.com/ERGO-Code/HiGHS/releases/tag/v1.15.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!12881
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
highs 1.15.1

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>Patch release v1.15.1 fixes:

Apache release binaries not including HiPO fixed in [PR #3112](ERGO-Code/HiGHS#3112).

Build for users with C++20 fixed in [PR #3114](ERGO-Code/HiGHS#3114).

OpenBLAS setup issue affecting performance fixed in [PR #3122](ERGO-Code/HiGHS#3122).

Values passed for string option values (except for file names) are
converted to lower case [PR #3108](ERGO-Code/HiGHS#3108).

---


The highlights of v1.15 are the first variant of the parallel MIP solver
and the addition of HiPO in Python.

## Code changes

Following [PR #2886](ERGO-Code/HiGHS#2886), our
prototype multithreaded MIP solver is available, refactoring
the worker/node-search logic of the branch-and-cut solver to run
across multiple threads. This is the first release of the parallel MIP
solver.

A fix to the parallel scheduler was merged in
[PR #3087](ERGO-Code/HiGHS#3087).

Following [PR #2994](ERGO-Code/HiGHS#2994),
HiPO can now be used to solve LPs and QPs from `highspy`, with
documentation added in
[PR #3024](ERGO-Code/HiGHS#3024) and
[PR #3060](ERGO-Code/HiGHS#3060). HiPO
performance was further improved by faster handling of free variables
([PR #3013](ERGO-Code/HiGHS#3013)) and faster
triangular solves
([PR #3014](ERGO-Code/HiGHS#3014)).

Prompted by [#2957](ERGO-Code/HiGHS#2957),
square Hessians that are only slightly asymmetric are now accepted by
`Highs::qFormatOk`, rather than being rejected outright
([PR #2965](ERGO-Code/HiGHS#2965),
[PR #2984](ERGO-Code/HiGHS#2984) and
[PR #3003](ERGO-Code/HiGHS#3003)). Identification
of non-convexity in the QP solvers was also improved, with extended
documentation added in
[PR #3056](ERGO-Code/HiGHS#3056), and a further
bug affecting some QPs was fixed in
[PR #3069](ERGO-Code/HiGHS#3069). QP hot start
was added in [PR #3089](ERGO-Code/HiGHS#3089).

Following [PR #2982](ERGO-Code/HiGHS#2982),
several bugs in the computation of an Irreducible Infeasible Subsystem
(IIS) via `Highs::getIis` were fixed.

Following [PR #3046](ERGO-Code/HiGHS#3046),
zero-cost singleton columns are no longer fixed to an infinite bound
during `HPresolve::dualFixing`, and the size of shifts applied during
reduced-cost fixing was reduced in
[PR #2986](ERGO-Code/HiGHS#2986). Strengthened
variable bounds found during presolve are now retained
([PR #3010](ERGO-Code/HiGHS#3010)), a bug in
the computation of the fractional value of a variable with finite
lower and upper bounds was fixed
([PR #3005](ERGO-Code/HiGHS#3005)), and the
handling of infeasibilities for semi-continuous and semi-integer
variables was corrected
([PR #3018](ERGO-Code/HiGHS#3018)).

Following [PR #3042](ERGO-Code/HiGHS#3042),
parallel simplex is no longer used when solving the LP relaxations
that arise within the MIP solver, since it isn't safe to do so when
the MIP solver is itself running in parallel.

Following [PR #2971](ERGO-Code/HiGHS#2971),
`highspy` now supports scalar division, and significant improvements
were made to `highspy`'s static typing in
[PR #2983](ERGO-Code/HiGHS#2983). Context
manager support was added to `highspy` in
[PR #3093](ERGO-Code/HiGHS#3093).

Following [PR #3039](ERGO-Code/HiGHS#3039),
`Highs::setBasis` and `Highs::setLogicalBasis` have been implemented,
and additional methods were added to the C# wrapper in
[PR #3041](ERGO-Code/HiGHS#3041).

Prompted by [#3044](ERGO-Code/HiGHS#3044),
a further bug was fixed in
[PR #3092](ERGO-Code/HiGHS#3092), and
[PR #3091](ERGO-Code/HiGHS#3091) corrects the
re-checking of an implied bound, fixing
[#3090](ERGO-Code/HiGHS#3090).

Following [PR #2981](ERGO-Code/HiGHS#2981),
C-heap memory leaks in solver state cleanup were fixed, and
[PR #3081](ERGO-Code/HiGHS#3081) fixes a bug
in column stuffing.

Following [PR #3016](ERGO-Code/HiGHS#3016),
`Highs::presolve()` now logs and returns failure appropriately when
called inconsistently with the state of the incumbent model.

Prompted by [#3007](ERGO-Code/HiGHS#3007), a
potential typo in `FactorHiGHSSolver::chooseNla()` was corrected, and
several other minor fixes were collected in
[PR #3017](ERGO-Code/HiGHS#3017) and
[PR #3004](ERGO-Code/HiGHS#3004) (the latter
for `HighsCliqueTable`).

Following [PR #3057](ERGO-Code/HiGHS#3057),
lines in HiGHS options files that contain only spaces are now ignored,
and the text of the first line containing an error is printed in the
resulting message.

## Build changes

The Python build has been updated and an additional python package is
available. The HiPO dependencies are linked via the optional
`highspy-extras`, e.g. Metis, for all platforms, and OpenBLAS, for
Windows and Linux. The `highspy-extras` package is automatically
consumed by `highspy` and does not need to be imported manually. Note,
that `highspy-extras` is distributed under the Apache 2.0 license, due
to the dependencies' licensing.

On Linux, `libblas` is no longer supported, in favour of OpenBLAS. MKL
support would be considered at a later stage.

Prompted by [#3000](ERGO-Code/HiGHS#3000),
[PR #3027](ERGO-Code/HiGHS#3027) fixes a
recent `alpine:edge` compilation issue.

Following [PR #3025](ERGO-Code/HiGHS#3025),
all remaining thread sanitizer data race warnings are cleared.

GPU support was added for local Python pip installs in
[PR #3071](ERGO-Code/HiGHS#3071) and the BLAS
library used by HiPO is now checked at runtime
([PR #3080](ERGO-Code/HiGHS#3080)).

The `cibuildwheel` workflow and `pyproject` configuration were updated
to `cibuildwheel` 4.0.0
([PR #3061](ERGO-Code/HiGHS#3061)), and the
NuGet publishing workflow now uses trusted publishing rather than an
API key
([PR #3062](ERGO-Code/HiGHS#3062),
following [PR #2959](ERGO-Code/HiGHS#2959)).

The macOS GitHub Actions build times were significantly improved in
[PR #3033](ERGO-Code/HiGHS#3033), and the C#
wrapper build was fixed to statically link the MSVC STL and correctly
install on win32
([PR #3070](ERGO-Code/HiGHS#3070)).

Following [PR #3001](ERGO-Code/HiGHS#3001),
the install location of the readme and license files was corrected,
and explicit `-fexceptions` copts were added to the Bazel config
([PR #3072](ERGO-Code/HiGHS#3072) and
[PR #3075](ERGO-Code/HiGHS#3075)).
</pre>
  <p>View the full release notes at <a href="https://github.com/ERGO-Code/HiGHS/releases/tag/v1.15.1">https://github.com/ERGO-Code/HiGHS/releases/tag/v1.15.1</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!13385
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.

2 participants