-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Linking to blas on openSUSE for MXNet in Julia 0.4.6 #18394
Comments
I don't think we build the OpenSUSE repo version. What's the action item here? |
Oh, in that case I must have misunderstood the situation. Permit me to close the issue and I will take it up elsewhere. Thanks. |
@tkelman FWIW I deleted my openSUSE repo version of 0.4.6 and wiped the cache. I then installed the 0.4.6 and v 0.5r3 from "Generic Linux" binaries on the Julia page. The 0.4.6 installs but will not build MXNet from checkout master, stops at the -lcblas again. But 0.5r3 is good. It builds MXNet and passes tests like 0.6. A few depwarns but that is future stuff. |
who is trying to link against cblas? julia doesn't ship that, so back to being an mxnet.jl issue. on opensuse packaging, who is the maintainer there? i guess they use bugzilla for tracking opensuse package issues? |
OpenBLAS includes CBLAS, we use it and it seems that MXNet is also calling it. Probably for row major support. |
I guess it must be MXNet trying to link. It is when I try to build MXNet that it crops up. |
we don't ship it under the libcblas name. you might be using different versions of mxnet.jl on 0.4 vs 0.5? |
MXNet.jl tries to use the BLAS installed with Julia, but we were not good enough at detecting when it was build with something that was not openblas. |
Hi @colbec ! In openSUSE, we do not build julia against openblas. If you execute the
After changing to openblas, all the tests in |
Hi @ronisbr , thanks for the suggestion. I did as you suggested and linked to the most obvious alternatives in update-alternative and rebooted and attempted a rebuild of MXNet on 0.4.6 but it failed as before not able to find clbas.h. It is definitely there in /usr/include/openblas/, strange that it cannot be found by MXNet. |
@ronisbr opensuse should make openblas a mandatory dependency of julia. there's no reason to do otherwise, it makes julia look bad if basic linear algebra operations are slow and serial. |
Hi @tkelman, This is strange. For my simulations, in which there are a lot of operations with small matrices (3x3, 4x4), I see no gain at all using openblas. Actually, sometimes openblas is slower. Do you have any good explanation to that? In terms of turning openblas as a mandatory dependency, I think I cannot do it. Because, even if openblas can get installed with julia, the user must choose it as the default implementation of the libraries using |
The point of BLAS is not to be fast for small matrices but for large ones. For 2x2 and 3x3 Julia don't even call BLAS. |
Thanks @KristofferC . That explains a lot :) |
set the openblas name directly, don't use the libblas update-alternatives alias. needless complexity there that we should just avoid. |
But then there are some versions of openblas:
Which one should I use? By using the |
either the pthreads one or the openmp one (check which version the source build of julia defaults to). both should be user-controllable, and probably not much different in performance from one another. update-alternatives doesn't really work for julia if the threading api changes, since you'd need to rebuild the system image if the blas vendor or set_num_threads api functions need to change. just swapping the symlink isn't enough. |
Thanks @tkelman! I will add openblas as a mandatory dependency and set:
Is it correct? |
I think so. That will be one of the parallel versions? |
@tkelman sorry! That should be |
Hi guys! I updated julia to using openblas by default as suggested by @tkelman . The new version is already submitted to my home repo and should hit tumbleweed soon. Now,
Notice that all tests in Thanks for the tip @tkelman . |
much better, thanks! was the test failure against reference blas a numerical issue or missing function? |
It was due to missing functions. |
Was it the cblas functions we use in a few places where the calling convention is ambiguous between different compilers? ref JuliaLang/LinearAlgebra.jl#137 - I thought most distros build the cblas API into libblas these days but maybe some separate them. |
@tkelman here is the output of
|
thanks for the info @ronisbr (logs that long might be a little better in a gist next time though), that is indeed JuliaLang/LinearAlgebra.jl#137 |
I note that Yast in Leap 42.1 has a package cblas-devel which appears to offer headers for cblas. It's not installed by default. |
We don't need the headers (MXNet.jl might), but we are currently assuming that cblas symbols for |
Hi @tkelman! Julia 0.5.0~rc4 was accepted and now Tumbleweed users after the update will use julia with |
Currently, on the openSUSE repo version of Julia 0.4.6 it is difficult to work with MXNet where the Pkg.add, checkout, and build all perform well but the tests fail due to a doubtful link to the correct version of BLAS. Julia version 0.6 however has no problem installing and running the tests, indicating that it is the build of 0.4.6 for openSUSE which is perhaps at the root of the matter.
I opened in error an issue at apache/mxnet#3244, where we learn that MXNet requires openblas. There is a suggestion that a hard link to a fixed version of openblas might help, rather than letting the openSUSE system decide which library to use.
(cc: @ronisbr)
The text was updated successfully, but these errors were encountered: