Skip to content
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 for python 3.8 and numpy dependency #432

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Fix for python 3.8 and numpy dependency #432

merged 1 commit into from
Jul 3, 2024

Conversation

mbkumar
Copy link
Collaborator

@mbkumar mbkumar commented Jun 27, 2024

This PR adds python-version specific dependencies to address numpy compatibility with v1.x and v2.x.

There is one spec test failing in 3.8. Could that be due to numpy 2.0 and numpy 1.x differences?
@smiet, can you please invetigate?

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.99%. Comparing base (9dd34c5) to head (6ac3fa8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #432   +/-   ##
=======================================
  Coverage   91.99%   91.99%           
=======================================
  Files          75       75           
  Lines       13499    13499           
=======================================
  Hits        12419    12419           
  Misses       1080     1080           
Flag Coverage Δ
unittests 91.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@smiet
Copy link
Contributor

smiet commented Jun 28, 2024

all passing now, fixed on current spec master by not requiring 2.0 if python<3.8.

There is a new PR waiting that removes numpy dependency on install, but that shouldn't affect this.

@mbkumar mbkumar requested review from landreman and smiet June 28, 2024 11:37
@mbkumar
Copy link
Collaborator Author

mbkumar commented Jun 28, 2024

@smiet

Spec related tests are still failing. https://github.com/hiddenSymmetries/simsopt/actions/runs/9713949797/job/26811901758 Can you please check?

@smiet
Copy link
Contributor

smiet commented Jun 28, 2024

@mbkumar the failures you are referring to are caused by an identifier collision in the python cache of the Fortran memory. They occur because f90rwap uses an identifier based on the pointer in memory for its python-cache, and re-loading a Spec object results in sucessive deallocation and allocation, with possibility of occupying the same location on memory-constrained systems (such as runners). This results in the collision such that python references an outdated and misshapen array.

Will be addressed and fixed in PR #431, if you want to speed it up, give it an approve, or directly merge it ;)

Copy link
Contributor

@smiet smiet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you in that the scikit-build-core version is necessary, and not too-constraining. The numpy versioning is what it should be until 3.8 reaches EOL.

@mbkumar mbkumar merged commit 8d6e86a into master Jul 3, 2024
72 checks passed
@mbkumar mbkumar deleted the numpytypes branch July 3, 2024 16:47
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.

2 participants