-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add LAPACK/BLAS linking to FAQ #1312
Conversation
docs/src/FAQ.md
Outdated
|
||
For the ILP64 interface (64-bit integers) of LAPACK, use the binary dependencies `LAPACK_jll` and either `ReferenceBLAS_jll` ([Netlib Reference BLAS](https://www.netlib.org/blas/)) or `OpenBLAS_jll` ([OpenBLAS](https://www.openblas.net/)). For the LP64 interface (32-bit integers) of LAPACK, use `LAPACK32_jll` and either `ReferenceBLAS32_jll` or `OpenBLAS32_jll`. |
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.
Actually, ideally one would link to libblastrampoline.
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.
Ok, so then I feel that somewhere in the documentation for BinaryBuilder, new Julia/BinaryBuilder users should be pointed to libblastrampoline
for LAPACK/BLAS linking, and also more specific steps on how to use it and compile it properly on all platforms. Specifically, I feel the documentation/FAQs should explicitly state the modifications that someone needs to make to the CMakeLists.txt
, and the build script itself too.
For example, using this build_tarballs.jl
as a reference, on Windows there is some name changing that the build script needs to do to find libblastrampoline
. A small blurb in the documentation stating this could save a lot of time/pain.
And in cases where modifying the Makefile
or CMakeLists.txt
to instead link to libblasttrampoline
is painful/inconvenient/etc, the solution I put above is a nice fallback, at least. See the build_tarballs.jl
for a library I've been working on, where the build script is completely trivial - just calling cmake
, no name changing, and also no changes to the CMakeLists.txt
.
Speaking from personal experience, one of my first tasks as new Julia user for my work was to wrap a relatively simple C library which has only LAPACK as a dependency. I feel the process was more painful than it needed to be, and a simple blurb such as the one above in the FAQ would have saved me a lot of time. Initially, even after I got it compiled, and all of the tests passed and merged into Yggdrasil, a user of my package-in-development, which uses the _jll package, found that using
the package on Windows threw an error, even though it worked on MacOS and Linux. After some investigating I found this was all because of having LAPACK32_jll
with ReferenceBLAS_jll
, instead of ReferenceBLAS32_jll
, which I wasn't aware existed. And so small blurb in the FAQ I feel could really help new users with LAPACK linking with minimal pain.
How about something like this? |
It's much more complicated than that. I'll open another PR with more info |
Added a short FAQ in the documentation about how to properly link against LAPACK/BLAS in response to #1311