Skip to content

Updated third party dependency support#3031

Open
mathgeekcoder wants to merge 20 commits into
latestfrom
third-party-dependencies
Open

Updated third party dependency support#3031
mathgeekcoder wants to merge 20 commits into
latestfrom
third-party-dependencies

Conversation

@mathgeekcoder
Copy link
Copy Markdown
Collaborator

@mathgeekcoder mathgeekcoder commented May 19, 2026

This PR makes several changes to improve external dependency support in HiGHS.

  1. Optional dependencies are now more explicit, with isAvailable<Feature1, Feature2>() support
  2. Features can be bundled into feature sets, e.g., hipo = require<amd, blas, ...>
  3. Uses recursive templates so that nested feature sets also supported, e.g., isAvailable<hipo, require<require<...>, ...>
  4. Uses template extensions so that new features can be added to the app, libhighs, or highs_extras, but still use the same API
  5. Tidied up highs_extras API, so that adding new features is easier and more consistent
  6. Added getThirdPartyNotice() and --notice to get current list of enabled dependencies (with version and license info)
  7. Added HighsDynamicLibrary, which can be used in the near future for dynamic CUDA support
  8. Tidied up blas cmake routines and highs_extras cmake for increased maintainability
  9. Added README.md with details on how to add new dependencies and how the system works

Example of output:

> highs --notice
HiGHS version 1.14.0 Githash a372b82b08. Copyright (c) 2026 under MIT licence terms
Includes third-party software components, see THIRD_PARTY_NOTICES.md for full details

Third-party components:

key      name             version       license     
-------  ---------------  ------------  ------------
amd      SuiteSparse AMD  7.12.1+       BSD-3-Clause
blas     OpenBLAS         0.3.29        BSD-3-Clause
cli11    CLI11            2.5.0         BSD-3-Clause
metis    METIS-GKlib      5.2.1+        Apache-2.0  
pdqsort  pdqsort          git:b1ef26a   Zlib        
rcm      SPARSEPAK        unversioned+  MIT         
zlib     ZLIB             1.3.1         Zlib        
zstr     zstr             1.0.6         MIT  

…s change is to make dependencies more explicit and provide the consumer with detailed information. Also, to make it easier for us to add new dependencies in the future.

* highs_extras is now always built, but with optional features (like HIPO)
* Each project (app, libhighs, high_extras) has a file that defines its dependencies
* Added --notice to app that prints list of dependencies and their version/license info
* Moved all dependencies into extern directory
* Refactored FindHipoDeps into cmake functions
* Refactored highs_extras CMakeLists, for easier maintenance
* Improved naming to closer align to HiGHS standards
* Added HighsDynamicLibrary for portable dynamic library loading.  Can also be used for future CUDA support via Driver API
* Added simple string join and table rendering
* Added README documentation for the new features/structure
… type deduction)

Fixed BUILD_OPENBLAS issue not identifying version/license information
…n order

Fixed include issues with HighsDynamicLibrary
…arty methods (even when not used).

Also fixed minor meson build error.
@mathgeekcoder mathgeekcoder marked this pull request as draft May 19, 2026 16:48
… clang and HIPO=OFF.

Basically, even though the external methods were never used the debug build still wanted to link to them.

So now, we explicitly separate the interface definition and the binding step.  Slight code redundancy, but seems unavoidable.

Also fixed code coverage workflow with corrected extern paths.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 63.30275% with 120 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.94%. Comparing base (1b68830) to head (9633d3e).
⚠️ Report is 12 commits behind head on latest.

Files with missing lines Patch % Lines
extern/HighsExtrasExternalDeps.h 5.12% 37 Missing ⚠️
highs/HighsExternalApi.cpp 60.60% 13 Missing ⚠️
highs/ipm/hipo/factorhighs/CallAndTimeBlas.cpp 0.00% 11 Missing ⚠️
highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp 0.00% 9 Missing ⚠️
highs/util/HighsDynamicLibrary.h 18.18% 9 Missing ⚠️
extern/HighsExtrasApi.cpp 0.00% 8 Missing ⚠️
check/TestHighsExternalDeps.cpp 80.00% 7 Missing ⚠️
highs/util/HighsDynamicLibrary.cpp 64.70% 6 Missing ⚠️
app/HighsAppExternalDeps.h 0.00% 5 Missing ⚠️
app/HighsRuntimeOptions.h 28.57% 5 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3031      +/-   ##
==========================================
+ Coverage   72.81%   72.94%   +0.13%     
==========================================
  Files         417      425       +8     
  Lines      102150   102181      +31     
  Branches    16463    16443      -20     
==========================================
+ Hits        74378    74535     +157     
+ Misses      27496    27370     -126     
  Partials      276      276              

☔ View full report in Codecov by Sentry.
📢 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.

@mathgeekcoder mathgeekcoder marked this pull request as ready for review May 19, 2026 23:23
@mathgeekcoder mathgeekcoder requested a review from galabovaa May 19, 2026 23:26
@mathgeekcoder
Copy link
Copy Markdown
Collaborator Author

@galabovaa and @filikat - I'd appreciate if you could have a look! Apologies, it turned out to be a much larger change than I originally intended.

Happy to discuss.

mathgeekcoder and others added 2 commits May 19, 2026 16:45
Copy link
Copy Markdown
Contributor

@galabovaa galabovaa left a comment

Choose a reason for hiding this comment

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

LGTM!

@galabovaa
Copy link
Copy Markdown
Contributor

@galabovaa and @filikat - I'd appreciate if you could have a look! Apologies, it turned out to be a much larger change than I originally intended.

Happy to discuss.

I have had a look, and did not spot anything I would disagree with. Thank you again for this!

@filikat
Copy link
Copy Markdown
Collaborator

filikat commented May 20, 2026

The details are well beyond what I can comfortably understand in cpp, but it looks great!

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