-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load hsl solvers with ipopt 3.14.15 #759
Comments
Damn it. The dynamic loading of libraries like HSL on Windows is the one thing that changed from 3.14.14 to 3.14.15 (#755). Can you say more about your setup? Where do you have the HSL DLL located, from where do you run Ipopt, and do you have the path to the HSL DLL in the |
Yes! In fact it was puzzling me. The error when it does not find the library is
The same error is also thrown when Windows does not find some runtime dependency of
The code I was trying to run is a bit complex, involving other dependencies (like |
Hmm, one would think that this setup would work. I have no clue what it means by a parameter being incorrect. An original suggestion in #755 was to try both |
Thanks @svigerske for the quick reply ! I backported the patch in conda binaries for 3.14.15 in conda-forge/ipopt-feedstock#103, I also enable upload of test artifacts (see https://conda-forge.org/docs/maintainer/updating_pkgs/#downloading-prebuilt-packages-from-ci), so @S-Dafarra you can test if that PR solve your problem (just install with
Unfortunately at the moment we are using a custom CMake script for ipopt mantained at https://github.com/conda-forge/ipopt-feedstock/blob/main/recipe/cmake/CMakeLists.txt . It would be great to be aligned with upstream, but to be honest I never looked into how to make autotools works with the rest of the Windows conda-forge machinery. For what regards HSL's dll, actually those are built with a fix we did to HSL's upstream meson build system, we actually still need to report that fix upstream. |
Actually I had checked #755 back when it was proposed, and it seemed fine. However, looking into the details of the documentation I noticed that in https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa it reads that if |
Oh, I read through this documentation several times, and still overlooked that small sentence. So if It should be sufficient to check |
In the next release, This seems to work on my system when specifying a library as absolute path or when having it in PATH. CC @metab0t |
Thanks for the fix!
Sorry, I missed that comment. I am not sure how widespread those are, but I guess that check may be fail when using UNC or DOS device path (see https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths). Anyhow, I guess those are kind of seldomly used, and anyhow if they are used the normal |
@svigerske Sorry for breaking existing code because of the mess of DLL search strategy on Windows. Instead of judging whether the path is absolute, can we just use the initial commit? Search the default paths, if not found, then use |
I was changing it to We can do as in the initial commit, just need to improve error handling. At the moment, the message from the |
Yes, I agree. |
By passing the absolute path using the |
I have tested the version mentioned in conda-forge/ipopt-feedstock#103 (comment) and it also works with the default relative setting. Thanks a lot @svigerske and @traversaro for the super quick support! |
@traversaro Don't hesitate to contact me if you have an issue the new Meson build system of COIN-HSL / libHSL. |
Great! I sent you a mail. |
I have installed
ipopt
3.14.15 withconda
on Windows.If I try to use a
hsl
linear solver, I get the following exception:If I use the 3.14.14 version instead it works fine.
The text was updated successfully, but these errors were encountered: