Fix a couple errors caught by the SciPy build process#209
Merged
zaikunzhang merged 3 commits intolibprima:mainfrom Mar 26, 2025
Merged
Fix a couple errors caught by the SciPy build process#209zaikunzhang merged 3 commits intolibprima:mainfrom
zaikunzhang merged 3 commits intolibprima:mainfrom
Conversation
SciPy complained about "expression result unused" for the extra '(',
which makes sense.
It also complained about `rc` being unused. This is slightly annoying
because we put the return value of `prima_minimize` in `result.status`.
I decided it made sense to return info by itself if there was an error
in either `init_result` or `check_problem`, and then just return DFT by
default.
0532540 to
9b8dd73
Compare
8aae724 to
c46707f
Compare
6e8f4b8 to
5ad853b
Compare
- gcc 13.3.0 seems to have an issue with math.h on macOS. It spews a bunch of errors about the API_DEPRECATED macro not being used correctly, which is not an issue on our side. gcc 13.2.0 does not seem to have this issue, but since we cannot select gcc with such granularity we downgrade to gcc 12 and hope this fixes the issue for now. - numpy 2.0.0 has come out which causes runtime issues. Fortunately the fix is easy, just build with pybind11 >=2.12.0. However this is still an issue for the pdfo compatibility test since pdfo does not support numpy 2.0.0, and sometimes the tests install 2.0.0 because it happens to be in the pip cache. So we upgrade pybind11 (the new version is compatible with 2.0 and 1.0 numpy) and skip the pdfo test if we happened to pick up numpy 2. - macOS builds for building Python wheels started to complain when running the "delocate" step that libquadmath, libstdc++, and libgfortran have minimum targets of 11.0, whereas the default was 10.9, hence we added the relevant env variable for CIBW. - Notes have been made in build_python.yml for failures related to Ubuntu 24.04. - A couple tests were failing on macOS 14. I tried to modify rhobeg and rhoend, but this ended up turning into a game of whack-a-mole, where a rhobeg/rhoend that worked on one architecture would fail on another. Ultimaately the most reliable solution I found was to modify the starting point to be close to the optimal point.
Member
|
Thank you @nbelakovski . Appolgies for this long delay. All changes are accepted except for the removal of the ubuntu-24.04 image in build_python.yml. Let's see what will happen since many months have passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SciPy complained about "expression result unused" for the extra ')' in the repr function, which makes sense.
It also complained about
rcbeing unused. This is slightly annoying because we put the return value ofprima_minimizeinresult.status. I decided it made sense to return info by itself if there was an error in eitherinit_resultorcheck_problem, and then just return DFT by default.