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

RTLD flags For Python3 #213

Open
mdavis36 opened this issue Apr 18, 2023 · 4 comments
Open

RTLD flags For Python3 #213

mdavis36 opened this issue Apr 18, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mdavis36
Copy link
Collaborator

scipy internally builds it's own qhull as a shared library that is imported at runtime for a couple of packages. When we build Spheral with clang, I find that if Spheral is imported before one of the select scipy packages it will fail with a runtime error. The solution seems to be to import a scipy package before importing the compiled Spheral package so that the LD runtime gets the scipy qhull library first.

qhull has an internal check to ensure any call to it's API is coming from the same type of library (i.e. shared vs static) and the shared library seems to take precedence over the static one for this test. I don't know why we haven't seen this before on clang but I'm confident it has to do with the ctype LD runtime flags we have to throw in Spheral.py when not using a gnu type compiler.

Python3 has better support for RTLD flags that Python2.7, after the Python3 port we should investigate this further.

@mdavis36 mdavis36 added the bug Something isn't working label Apr 19, 2023
@jmikeowen
Copy link
Collaborator

A simple workaround might be to import scipy in our Spheral.py front-end script before we import the compiled packages, if the RTLD flags are difficult to sort out.

@mdavis36
Copy link
Collaborator Author

That is exactly what we are doing to get around this now, I think it came in the Python3 PR

@jmikeowen
Copy link
Collaborator

Awesome, so should we close this issue? Or keep it open if we want to investigate the RTLD flags?

@mdavis36
Copy link
Collaborator Author

Keep it open for investigation of the RTLD flags, resolving the scipy problem might be a good way to investigate the proper solution to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants