Refactor the HiPO build system to support cross compilation#2550
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## hipo-dev #2550 +/- ##
===========================================
Coverage ? 81.05%
===========================================
Files ? 347
Lines ? 86974
Branches ? 0
===========================================
Hits ? 70500
Misses ? 16474
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@amontoison: I see that you forked METIS for Julia. What's the status of upstream? Should I just grab your binaries instead? |
|
@odow The original website is not working anymore but it seems that they did the new web page now: I suggest to grap my binaries because it contains a few patches, particularly for Windows. |
|
@filikat do you know about these segfaults on Windows? |
|
@odow Ivet told me about them, but I don't know why they happen and I don't have a machine with Windows. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
So this happens in Julia because we force |
|
The related issue is that we have re-interpreted HiGHS/highs/lp_data/HighsOptions.h Lines 260 to 262 in 364c83a This is potentially a breaking change for folks like GenX which force the solver to |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I agree with you, we should maintain compatibility for people who were selecting "ipm" thinking that they got IPX. |
|
I made this change deliberately as it aligns with what will happen in future. The ipm string can no longer be interpreted as a specific implementation. |
Don't worry about this for now. The priority is performance for feasible LPs |
@odow Could you try to run the same problem, setting output_flag to true for the ipm in the analytic centre computation and log_dev_level to 1. Maybe we can see at what point the ipm fails. |
@odow I see. I will change the test so that it uses two separate Highs objects, just to be sure. |
jajhall
left a comment
There was a problem hiding this comment.
@odow Please revert the changes of
const string kIpmString = "ipm";
const string kHipoString = "hipo";
const string kIpxString = "ipx";
to
const string kIpmString = "interior-point";
const string kHipoString = "hipo";
const string kIpxString = "ipm";
since IPM should not be synonymous with IPX, and the corresponding changes in TestSpecialLps.
@odow How can With my changes that's still happening - except that HiPO (when available) is being used by default. Anyone who is setting All that's changed is that In due course HiGHS will choose between IPX and HiPO, using the former for small LPs, or on the basis of other characteristics. Similarly, in due course, with If people wanting IPM are finding that HiPO is slower or less reliable than IPX, it's not difficult for them to change a single parameter to force the use of IPX. |
|
This is a draft WIP PR. My goal is just to get the tests passing. Re ipm: This just shows the difficulty of naming things with backward compatibility. Fully agree that Until HiPO is mature, I think we should be making HiPO explicitly opt-in. IMO: the priority should be: fixing Windows segfaults, fixing failing unit tests, making it so we can actually compile and distribute HiPO. Once it's in |
Agreed, which is why I was surprised at you making changes to solver code.
So If people don't know that the "ipm" solver in HiGHS is called "ipx", I fail to see the problem with switching the default IPM solver
I note your opinion. However, by making HiPO default when
I note your opinion, but @filikat has only so much to contribute in this area. His priority is performance and robustness. At this stage, infeasibility detection is not important. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Trying here: #2572 |
|
If we're patching METIS, we could just carry the patch so that glib doesn't need to be linked explicitly? There really should be no need for HiGHS to know about gklib |
|
@galabovaa it seems like hipo-tt-dev-gk doesn't include the latest changes from hipo-dev. Maybe you made the branch starting from hipo instead? |
|
What if I just use your patched version of METIS here? (Oh, because of the gklib stuff) |
I think that's one of the patches that Ivet applied to her version of Metis (https://github.com/galabovaa/METIS/tree/510-w) |
I did start from hipo, I thought I merged hipo-dev but must have forgotten to pull. I will merge it tomorrow when we meet
The GKlib path is only optional as we discussed, with the patched up metis or vcpkg you just don't specify it. Sure, I can add the julia workflows from this PR too |
Looks like you merged hipo-dev into hipo-tt-dev but not hipo-tt-dev-gk |
|
I'm seeing lots of green! Looks like Ivet's patched METIS did the trick. |
|
Why do we have |
Some people are already using the code in |
|
I've rebased onto |
|
I've rebased this onto the latest What's the status of this? If we don't like detecting openblas/accelerate from the string, another option for setting |
|
@odow Ivet is making progress in |
|
I added the julia build and workflows to hipo-tt and the tests are passing now. @odow, can you please have a look and double check that things there work as expected? I looked up how blas trampoline would work and found that a suggested way was to use BLA_VENDOR so I added this to our CMake for the BLAS, is that OK? |
|
See the builds https://github.com/ERGO-Code/HiGHS/actions/runs/18570757342/job/52943747516 Mac and linux are finding the host BLAS:
We need them to find the BLAS in
We cannot assume that the machines we deploy the binaries on have a BLAS in the same location. |
|
I don't really see the need for HiGHS/cmake/FindHipoDeps.cmake Lines 5 to 109 in fb5e7cf What's the problem if we just do and then Lines 219 to 227 in fb5e7cf Is there some issue if a downstream project uses HiGHS in its CMake? |
| -DZLIB_USE_STATIC_LIBS=${BUILD_STATIC} \ | ||
| -DFAST_BUILD=ON .. | ||
| -DHIPO=ON \ | ||
| -DBLAS_LIBRARIES="${libdir}/libopenblas.${dlext}" \ |
There was a problem hiding this comment.
@galabovaa in the Julia build I just forced the BLAS I wanted
|
Stepping back, what are the use cases we're trying to support? It seems you want the defaults to work if:
We also want to support:
The last three can be supported by someone explicitly setting the BLAS library, like I'm doing for Julia in this PR? And 1. and 2. and 3. are supported by |
|
Sure, find_package(BLAS) is probably enough. Will leave the other code as optional, for now. It would be great if you could pull the updates from hipo-dev and double check that the julia side is OK |
|
CI runs look okay to me |


x-ref #2542