-
Notifications
You must be signed in to change notification settings - Fork 354
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
Fix mac tests with conda #4946
Fix mac tests with conda #4946
Conversation
326549a
to
6257a5a
Compare
@titodalcanton @ahnitz, I think this fixes the test configuration, but exposes a real-world test failure:
I don't think this object is available on arm64. Can/should the calling code be patched to use |
6bbf624
to
220f171
Compare
The lapack pinned version was important ... |
220f171
to
821ecc3
Compare
Why? It is (I think) precisely the reason why the build is failing, that old version of lapack has not been, and will not be, built for macOS on ARM64. |
@duncanmmacleod I think lapack stopped shipping the headers after this release, making it very hard to build codes from source that compile against it. There's also this weirdness about liblapacke, which I think also isn't in the new releases. https://github.com/mikekatz04/BBHx?tab=readme-ov-file#prerequisites (because PyCBC does not use lapack directly, we use it via numpy like most). I have built a BBHx env on my ARM mac though using this version of lapack ... Though it does cause an issue on the IGWN envs (where lapack, or the lapack headers, are not present), which is a discussion I'd been meaning to have with you at some point. |
Although I now see that my mac env has lapack=3.9.0 installed, so I'm not sure how that worked/is working. |
tox.ini
Outdated
; Tell the linker to look for shared libs inside the temporary Conda env. | ||
; Needed to build BBHx's wheel, whick links to LAPACK. | ||
LIBRARY_PATH={envdir}/lib:{env:LIBRARY_PATH:} | ||
ligo-segments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duncanmmacleod Thanks for looking into this!
A couple of these are python packages that we should be picking up through the requirements. At least
ligo-segments and python-ligo-lw should probably be removed from conda_deps, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahnitz, these two packages are specifically called out in the conda requirements because PyPI only has a source distribution and these projects don't build cleanly with newer Python versions and newer versions of Clang. This means that pip install python-ligo-lw
fails.
The conda packages include the necessary patches to build, but that hasn't (yet) been backported into the source distribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duncanmmacleod Ok, that's fair enough. In which case, I'd just request a comment explaining this. In principle these lines should be removed once those changes have been included in the upstream code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahnitz, I have separated things out so that there is a unique commit that adds these packages to the tox.ini
file (with a comment) that can be simply reverted when appropriate.
This is the difference between the packages that provided the headers, and those that provide the libraries. The headers do seem to be a little muddled, it took me a while to find that we need the packages |
821ecc3
to
f8e76c1
Compare
@duncanmmacleod The failure related to this that I see above is in a test case that is really designed to test "have we broken anything in PyCBC Live". It compares to an old version of PyCBC Live which wouldn't run on a mac (though the test may now run on a mac with this change), so this comparison may not make sense on a mac ... But all other places have changed So in short, I would be happy with just changing this. If the test still fails, disable it on mac. |
@spxiwh, I took the liberty of adding that change, and it fixes the tests, so I'm happy. There are other uses of
|
Interesting! I hadn't been aware that module even existed. Something to be removed, I think! |
I think this also cleans up a bit the problem mentioned in #4857. Thanks @duncanmmacleod. |
use setup-miniconda github action and specify more packages in conda_deps for each testenv
these packages don't install cleanly with pypi, but the conda packages have patches
float128 isn't available on macOS ARM64
35c8fd6
to
0d1c9bc
Compare
.github/workflows/mac-test.yml
Outdated
conda install \ | ||
pip \ | ||
setuptools \ | ||
"tox<4.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this restriction understood?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason was discussed here #4208 ... It may no longer apply.
We list the same |
@titodalcanton I have attempted to clean this up by moving the I am not very familiar with tox and tox.ini syntax, so I could easily have done something bad. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell the tests now work for Mac as well, they pass, and the CI configuration has been simplified.
Thanks @duncanmmacleod ... I see no further comments on this, and the tests are passing, so merging now. |
Standard information about the request
This is a: bug fix
This change affects: continuous integration
This change changes: continuous integration
This change: has appropriate unit tests, follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines
This change will: n/a
Motivation
Fixes #4939
Contents
This PR fixes #4939 by updating the CI/tox configuration for macOS.
Links to any issues or associated PRs
Fixes #4939
Closes #4944
Testing performed
Additional notes