The default OpenBLAS packaged in Archlinux can produce wrong results for float64.
This is due to the fact that in Archlinux, the blas
package (from netlib reference implementation) has been separated into blas
for Fortran + cblas
for C interface. And Openblas only replaces blas
but uses the netlib cblas
which seems to be incompatible.
Looking into the standard library, it uses cblas
and so will be affected by this bug.
Upstream: FS#63054 : Openblas built from community gives wrong matrix multiplication results (DGEMM)
Workaround: use one of the openblas-lapack package from the AUR that provides Fortran blas, C cblas and Lapack interfaces.
Official build of Julia (or if you build Julia from source using BinaryBuilder-powered binaries) ships its own version of OpenBLAS, though. On ArchLinux I use the julia-bin
package in AUR for the stable version of Julia.
Could you please check if you can reproduce when using the library in https://github.com/JuliaBinaryWrappers/OpenBLAS_jll.jl/releases/tag/OpenBLAS-v0.3.7%2B0? Just find the tarball for your system (operating system + fortran library) and (temporarily) replace your system libopenblas
with the one in tarball (need to rename it, as it has a trailing underscore).
4 Likes
Thanks! I wanted to highlight that in fact it works to use the supplied OpenBLAS for future searches…
Note that installing the OpenBLAS_jll package did nothing for me - linking the lib however did.