-
Notifications
You must be signed in to change notification settings - Fork 21
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
Making X-PSI support Cython3 #434
Conversation
Syntaxes changes so that x-psi compiles without errors. Does still fail when importing x-psi.
I fixed the error with the commit above (needed to just add word "const" also in the function definition in
|
…function (PyInit___init__) Co-authored by: Evert Rol <evert.rol@gmail.com>
…g another __init__.pyx with core.pyx Co-authored-by: Evert Rol <evert.rol@gmail.com>
…. This time should work.
So to summarize: The error mentioned in the previous comment was fixed (thanks to @evertrol) by changing the name of the cython file Also needed to change the I did this change both for the The new code runs now without errors. Originally, I noticed that the new Cython3 code was consistently about 20% slower than the old Cython version when running the fast X-PSI example. However, this difference seems to have been vanished after I removed the remaining installation warnings by replacing all the |
So far, I checked this in a new environment with Cython 3. Installation works and the example cases in X-PSI as well. I also checked that this implementation works when installing it with Cython~0.29. Currently, still checking this on Snellius |
…this we need to switch to the 2024 stack, which we need to do anyways because the 2022 stack will be deprecated.
Last commit also fixes #474 related to updating the Snellius instructions. |
Accidentally closed this merge request instead of accepting it |
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.
Looks good Tuomo!
As a post scriptem for an attempted clarification about the actual error: Cython will create shared object files from the Why Python searches for The advice I find on this topic on the internet (in the few sparse places that talk about this error), is to not put all kind of definitions in Footnotes
|
Modifed X-PSI so that it can be installed with Cython3. I fixed the errors one by one as they appeared, based on suggested solutions., e.g. by adding "noexcept" before "nogil". For some reason I also needed to rename "I" with another name in some functions. Quite many warnings still left though. And X-PSI crashes now when importing it with the following error: