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

Null pointers in LP64 on Windows #89

Closed
ViralBShah opened this issue Sep 2, 2022 · 2 comments · Fixed by #97
Closed

Null pointers in LP64 on Windows #89

ViralBShah opened this issue Sep 2, 2022 · 2 comments · Fixed by #97

Comments

@ViralBShah
Copy link
Collaborator

ViralBShah commented Sep 2, 2022

Building Ipopt and MUMPS_seq with LBT using LP64 results in null pointer issues only on Windows (when using OpenBLAS32), both win64 and win32. Works fine on the other platforms.

Discussed in jump-dev/Ipopt.jl#327

@ViralBShah ViralBShah changed the title Null pointers in LP64 on Win64 Null pointers in LP64 on Windows Sep 2, 2022
@giordano
Copy link
Collaborator

giordano commented Nov 20, 2022

As far as I understand, the null pointer on Windows might be related to a mismatch between the name of the library used by Julia (libblastrampoline.dll: https://github.com/JuliaLang/julia/blob/67b8ac020833a14d98e8a147b8aae5caf2288a41/stdlib/libblastrampoline_jll/src/libblastrampoline_jll.jl#L22) and the library required by dependent libraries, which is set by the import library (libblastrampoline-5.dll as of #88, before that it'd be something like libblastrampoline-5-2-0.dll): when julia dlopens libblastrampoline.dll it also initialises that library, setting where to forward the blas/lapack calls, but then when the dynamic loader loads a dependent library it dlopens libblastrampoline-5.dll/libblastrampoline-5-2-0.dll separately, but this wouldn't have been initialised, causing forwarded calls to go into a void.

I believe the solution would be to have a single copy of libblastrampoline around on Windows, and make sure the import library is consistent with that only library available. Ideally that'd be libblastrampoline-5-.dll, but that wouldn't work with already released versions of Julia because they only use libblastrampoline.dll, so another option is to keep only libblastrampoline.dll, which is a blatant lie in terms of compatibility, but at least would make the transition smoother.

This was mostly debugged by @vchuravy

@giordano
Copy link
Collaborator

Should have been fixed by #97 (use a single library and live happy)

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 a pull request may close this issue.

2 participants