Skip to content

Fix a couple errors caught by the SciPy build process#209

Merged
zaikunzhang merged 3 commits intolibprima:mainfrom
nbelakovski:fixes
Mar 26, 2025
Merged

Fix a couple errors caught by the SciPy build process#209
zaikunzhang merged 3 commits intolibprima:mainfrom
nbelakovski:fixes

Conversation

@nbelakovski
Copy link
Copy Markdown
Contributor

@nbelakovski nbelakovski commented Jun 16, 2024

SciPy complained about "expression result unused" for the extra ')' in the repr function, 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.

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.
@nbelakovski nbelakovski requested a review from zaikunzhang as a code owner June 16, 2024 00:07
@nbelakovski nbelakovski force-pushed the fixes branch 2 times, most recently from 0532540 to 9b8dd73 Compare June 16, 2024 22:02
Comment thread .github/workflows/build_python.yml Fixed
Comment thread .github/workflows/build_python.yml Fixed
@nbelakovski nbelakovski force-pushed the fixes branch 2 times, most recently from 8aae724 to c46707f Compare June 16, 2024 22:04
Comment thread .github/actions/spelling/allow.txt Fixed
@nbelakovski nbelakovski force-pushed the fixes branch 7 times, most recently from 6e8f4b8 to 5ad853b Compare June 17, 2024 00:19
- 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.
@zaikunzhang
Copy link
Copy Markdown
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.

@zaikunzhang zaikunzhang merged commit 6eb69e9 into libprima:main Mar 26, 2025
36 of 61 checks passed
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